Skip to content
Advertisement

Where should i put Model files of VOSK speech recognition in java? ERROR (VoskAPI:Model():model.cc:122)

I have tried to use VOSK but get this error:

JavaScript

Advertisement

Answer

After downloading the language model you want from https://alphacephei.com/vosk/models you have to decompress the files inside the compressed folder.

Example: The spanish model downloads the compressed folder “vosk-model-small-es-0.22”, you have to put the files and folders inside “vosk-model-small-es-0.22” in the path you are passing to the Model constructor.

Model constructor accepts absolute paths:

JavaScript

I made some testing, and Vosk recognized my audios if they were 16KHz mono wav (I used audacity for the conversion).

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement