Open liuweie opened 1 year ago
final = vosk_recognizer_accept_waveform_f(recognizer, floatBuf, nread/sizeof(float));
nread/sizeof(float) should be wrong. You still have nread/2 samples even if you convert to float
I saw this also in the C# bindings when calling VoskRecognizer.AcceptWaveform(floatBuffer, numSamplesPerChannel)
when floatBuffer
contains float32 samples ranging from [-1.0, 1.0]. Is the function expecting the samples to be scaled differently (e.g. [-32767.0, 32767.0] ?
Is the function expecting the samples to be scaled differently (e.g. [-32767.0, 32767.0] ?
Yes, they have to be in 32768 range.
Hi , I used C++ to call your compiled library in windows ,when I use the vosk_recognizer_accept_waveform interface(accept const char data), the recognize result is perfect, but when I use vosk_recognizer_accept_waveform_f (accept const float data), the result is not very accurate. So I wandering if there is a problem with how I use the vosk_recognizer_accept_waveform_f ??
here is my code : ` int vosk(std::string wavFile, std::string modelPath) {
} `