Priler / jarvis

Voice assistant made as an experiment using neural networks for things like STT/TTS/Wake Word/NLU etc.
Other
1.94k stars 397 forks source link

Failed to create a model #2

Closed Vizer560 closed 1 year ago

Vizer560 commented 1 year ago

Возникла проблема

Скачал проект закинул vosk-model-small-ru-0.22 в корень проекта пробовал и vosk-model-ru-0.42

image

C:\Users\Vizer560\Desktop\jarvis-master>python main.py ERROR (VoskAPI:Model():model.cc:122) Folder 'model_small' does not contain model files. Make sure you specified the model path properly in Model constructor. If you are not sure about relative path, use absolute path specification. Traceback (most recent call last): File "C:\Users\Vizer560\Desktop\jarvis-master\main.py", line 4, in <module> import stt File "C:\Users\Vizer560\Desktop\jarvis-master\stt.py", line 7, in <module> model = vosk.Model("model_small") ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Vizer560\AppData\Local\Programs\Python\Python311\Lib\site-packages\vosk\__init__.py", line 29, in __init__ raise Exception("Failed to create a model") Exception: Failed to create a model image

Пытался установить зависимости командой pip install -r requirements.txt

image

C:\Users\Vizer560\Desktop\jarvis-master>pip install -r requirements.txt Collecting num2t4ru@ git+https://github.com/seriyps/ru_number_to_text@3b9ccdb36bb744341ee7bec9c50b51198259c648 Cloning https://github.com/seriyps/ru_number_to_text (to revision 3b9ccdb36bb744341ee7bec9c50b51198259c648) to c:\windows\temp\pip-install-ich_4cz6\num2t4ru_a456f4395ed04393aa49114720e3674f Running command git clone --filter=blob:none --quiet https://github.com/seriyps/ru_number_to_text 'C:\Windows\Temp\pip-install-ich_4cz6\num2t4ru_a456f4395ed04393aa49114720e3674f' Running command git rev-parse -q --verify 'sha^3b9ccdb36bb744341ee7bec9c50b51198259c648' Running command git fetch -q https://github.com/seriyps/ru_number_to_text 3b9ccdb36bb744341ee7bec9c50b51198259c648 Resolved https://github.com/seriyps/ru_number_to_text to commit 3b9ccdb36bb744341ee7bec9c50b51198259c648 Preparing metadata (setup.py) ... done ERROR: PyAudio-0.2.11-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.

Vizer560 commented 1 year ago

Еще пытался установить отдельно библиотеки не получилось тоже ошибки image

HenryTownshand commented 1 year ago

Тоже ошибку выдаёт. Винда 11 думаю прост вручную поставить его image

NiKoV-HET commented 1 year ago

Еще пытался установить отдельно библиотеки не получилось тоже ошибки image

stt файл лежит рядом с main.py, это не библиотека.

NiKoV-HET commented 1 year ago

Возникла проблема

Скачал проект закинул vosk-model-small-ru-0.22 в корень проекта пробовал и vosk-model-ru-0.42

image

C:\Users\Vizer560\Desktop\jarvis-master>python main.py ERROR (VoskAPI:Model():model.cc:122) Folder 'model_small' does not contain model files. Make sure you specified the model path properly in Model constructor. If you are not sure about relative path, use absolute path specification. Traceback (most recent call last): File "C:\Users\Vizer560\Desktop\jarvis-master\main.py", line 4, in <module> import stt File "C:\Users\Vizer560\Desktop\jarvis-master\stt.py", line 7, in <module> model = vosk.Model("model_small") ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Vizer560\AppData\Local\Programs\Python\Python311\Lib\site-packages\vosk\__init__.py", line 29, in __init__ raise Exception("Failed to create a model") Exception: Failed to create a model image

Нужно распаковать архив, который вы скачали, и переименовать в "model_small". В вашем случае достаточно просто переименовать папку "vosk-model-small-ru-0.22" в "model_small".

Priler commented 1 year ago

Папку vosk-model-small-ru-0.22 переименовываем в model_small. Скачиваем прекомпайлед PyAudio отсюда (https://download.lfd.uci.edu/pythonlibs/archived/PyAudio-0.2.11-cp38-cp38-win_amd64.whl) и кидаем в папку с Джарвисом. В файле requirements.txt ищем PyAudio и меняем путь к файлу который только что скачали. Будет что-то типа PyAudio @ file:///D:/jarvis-master/PyAudio-0.2.11-cp38-cp38-win_amd64.whl Дальше даем команду pip install -r requirements.txt

MrAlexey1 commented 6 months ago

А почему именно диск D?