Guest User

Untitled

a guest
Aug 18th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. import os
  2. from pocketsphinx import LiveSpeech, get_model_path
  3.  
  4. model_path = get_model_path()
  5.  
  6. speech = LiveSpeech(
  7. verbose=False,
  8. sampling_rate=16000,
  9. buffer_size=2048,
  10. no_search=False,
  11. full_utt=False,
  12. hmm=os.path.join(model_path, 'zero_ru.cd_cont_4000'),
  13. lm=os.path.join(model_path, 'ru.lm'),
  14. dic=os.path.join(model_path, 'ru.dic')
  15. )
  16.  
  17. print("Say something!")
  18.  
  19. for phrase in speech:
  20. print(phrase)
  21.  
  22. Traceback (most recent call last):
  23. File "C:UsersАдминDesktoppythonakys.py", line 14, in <module>
  24. dic=os.path.join(model_path, 'ru.dic')
  25. File "C:UsersАдминAppDataLocalProgramsPythonPython36libsite-packagespocketsphinx__init__.py", line 208, in __init__
  26. super(LiveSpeech, self).__init__(**kwargs)
  27. File "C:UsersАдминAppDataLocalProgramsPythonPython36libsite-packagespocketsphinx__init__.py", line 90, in __init__
  28. super(Pocketsphinx, self).__init__(config)
  29. File "C:UsersАдминAppDataLocalProgramsPythonPython36libsite-packagespocketsphinxpocketsphinx.py", line 272, in __init__
  30. this = _pocketsphinx.new_Decoder(*args)
  31. RuntimeError: new_Decoder returned -1
Add Comment
Please, Sign In to add comment