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

Same program with the same language model can't detect words on Windows but works on Mac #1466

Open tansyxiao opened 7 months ago

tansyxiao commented 7 months ago

I'm using Vosk with node.js on Max MSP. I've got a patch that works fine on Mac using the vosk-model-en-us-0.22 language model. Just installed the same thing (node.js/vosk/sox/exact same language model) on a Windows machine, changed nothing but the file paths. Everything seems to be running with no error in the log. But it just won't detect the words correctly. Even on the rare occasions when it does, it's almost always wrong. There should be no problem with the audio input, as the program shows the mic volume in real time. Tested in a relatively quiet office environment.

Any suggestions?

nshmyrev commented 7 months ago

dump the audio and listen, maybe it has wrong format

tansyxiao commented 7 months ago

The audio input is directly from the microphone, from human speech. Tested in the same way on Mac.

nshmyrev commented 7 months ago

You need to dump it to a file and listen

tansyxiao commented 7 months ago

I checked the parameters, tried the same microphone on the Mac with the same sample rate and it works there, just not on the Windows machine. Used SoX to record a short audio clip and listened to it, nothing sounded unusual.

nshmyrev commented 7 months ago

You need to listen for the data you feed into recognizer, not the sox output