Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. from danspeech import Recognizer
  2. from danspeech.pretrained_models import DanSpeechPrimary
  3. from danspeech.audio import load_audio
  4.  
  5. # Load a DanSpeech model. If the model does not exists, it will be downloaded.
  6. model = DanSpeechPrimary()
  7. recognizer = Recognizer(model=model)
  8.  
  9. # Load the audio file.
  10. audio = load_audio(path="../example_files/u0042019.wav")
  11.  
  12. # Recognize and print output
  13. print(recognizer.recognize(audio))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement