You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the examples, it looks like the required sample rate is 44.1kHz or 48kHz (they both seem to generate accurate transcriptions, not sure which one is better). I tried setting 16kHz for the microphone, audio context, and recognizer, but the transcriptions were not valid at all. I thought the models work with 16kHz; is there a reason why this sample rate doesn't work? The poster of #48 mentioned having to update from 16k to 48kHz in order for the basic example to work.
The text was updated successfully, but these errors were encountered:
The issue is most likely that some browser will not provide media at 16kHz (they ignore the samplerate parameter) and fallback to 48kHz. However you are telling vosk when creating the recognizer that audio will be streamed at 16kHz. You are thus sending 48kHz audio to a recognizer expecting 16kHz, which is why it does not work.
We can’t change the sample rate of the recording device but, if I recall correctly, we can manually specify the sample rate for the audio context and the browser would automatically downsample (using the Web Audio API) the audio data. I verified that I was indeed getting 16kHz PCM audio data by inspecting the waveform of a sine wave at a fixed and known frequency.
UPDATE
The demo does indeed work with 16kHz. Nevermind.
From the examples, it looks like the required sample rate is 44.1kHz or 48kHz (they both seem to generate accurate transcriptions, not sure which one is better). I tried setting 16kHz for the microphone, audio context, and recognizer, but the transcriptions were not valid at all. I thought the models work with 16kHz; is there a reason why this sample rate doesn't work? The poster of #48 mentioned having to update from 16k to 48kHz in order for the basic example to work.
The text was updated successfully, but these errors were encountered: