при запуске вот этого кода:
import os
from pocketsphinx import LiveSpeech, get_model_path
model_path = get_model_path()
speech = LiveSpeech(
verbose=False,
sampling_rate=16000,
buffer_size=2048,
no_search=False,
full_utt=False,
hmm=os.path.join(model_path, 'zero_ru.cd_cont_4000'),
lm=os.path.join(model_path, 'ru.lm'),
dic=os.path.join(model_path, 'ru.dic')
)
print("Say something!")
for phrase in speech:
print(phrase)
дает вот такие логи:
Allocating 32 buffers of 2500 samples each
Traceback (most recent call last):
File "D:\ITproj\Python\zadacha2.py", line 14, in <module>
dic=os.path.join(model_path, 'ru.dic')
File "C:\Users\Алишер\AppData\Local\Programs\Python\Python36\lib\site-packages\pocketsphinx\__init__.py", line 208, in __init__
super(LiveSpeech, self).__init__(**kwargs)
File "C:\Users\Алишер\AppData\Local\Programs\Python\Python36\lib\site-packages\pocketsphinx\__init__.py", line 90, in __init__
super(Pocketsphinx, self).__init__(config)
File "C:\Users\Алишер\AppData\Local\Programs\Python\Python36\lib\site-packages\pocketsphinx\pocketsphinx.py", line 272, in __init__
this = _pocketsphinx.new_Decoder(*args)
RuntimeError: new_Decoder returned -1
[Finished in 0.2s with exit code 1]
[shell_cmd: python -u "D:\ITproj\Python\zadacha2.py"]
[dir: D:\ITproj\Python]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\Алишер\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Алишер\AppData\Local\Programs\Python\Python36\;]