Huzaifa Shaikh
Huzaifa Shaikh

Reputation: 1

How to fix the issue while using vosk model & reproducing the issue in the path in the situation, when model is installed in node modules?

// Initialize the Vosk recognizer
vosk.setLogLevel(-1);
const model = new vosk.Model('E:\kidswatch_backend\node_modules\vosk\lib\win-x86_64\vosk_model\conf');
const recognizer = new vosk.Recognizer({ model: model, sampleRate: 16000 });

ERROR:
E:\kidswatch_backend>node server.js
ERROR (VoskAPI:Model():model.cc:122) Folder 'E:kidswatch_backend
ode_modules♂osklibwin-x86_64♂osk-model-en-in-0.5conf' 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.

enter image description here

https://github.com/HuzaifaZ9/vosk/blob/main/vosk%201.JPG

If the model path is correct, the expected output should not contain any errors related to the model path. Instead, it should proceed with the server initialization and possibly display messages related to the server starting up, such as:

Server running on port 3000

Upvotes: 0

Views: 308

Answers (0)

Related Questions