alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.37k stars 1.04k forks source link

Failed to create a vosk model #1473

Closed Bricker27 closed 7 months ago

Bricker27 commented 7 months ago

I have a problem opening a Python script compiled in exe. I used vosk in my project for speech recognition and tried different models and paths, but every time I get this error when creating a model. Who has had such a problem?

Traceback (most recent call last): File "my-script.py", line 56, in <module> File "vosk\__init__.py", line 57, in __init__ Exception: Failed to create a model

nshmyrev commented 7 months ago

Similar discussion at https://github.com/alphacep/vosk-api/issues/602

You probably have to unpack the model to filesystem first.

Bricker27 commented 7 months ago

Similar discussion at #602

You probably have to unpack the model to filesystem first.

thanks for the help, I already solved the problem :D

gonsodany commented 1 week ago

Similar discussion at #602 You probably have to unpack the model to filesystem first.

thanks for the help, I already solved the problem :D

how did you solve it? because i added the vosk package to the exe, but i still cant built in the model, i dont want the user to have the model in the folder with the exe

Bricker27 commented 1 week ago

Similar discussion at #602 You probably have to unpack the model to filesystem first.

thanks for the help, I already solved the problem :D

how did you solve it? because i added the vosk package to the exe, but i still cant built in the model, i dont want the user to have the model in the folder with the exe

in my case, I just didn't notice that for some reason the model folder was empty. check if the folder with the model is in the same directory as your exe file