Open leonardorame opened 1 year ago
If I change the line 62 from this:
context = new AudioContext({sampleRate: sampleRate})
to this:
context = new AudioContext({)
The error dissapear, but the server (asr_server.py
from vosk-server/websocket
) can't process the audio, it receives the audio, but isn't able to process.
I found a way to process the audio:
context = new AudioContext({)
and do a console.log(context)
to see what is the browser's sampleRate
.VOSK_SAMPLE_RATE
flag to match the browser's sampleRage
, in my case 44100
.This way the recognition works, but it's not as accurate as when using the test_microphone.py
example, which uses 8000
as sample rate.
In general we recommend you to use webrtc server and webrtc client.
Thanks @nshmyrev, I'll try that.
Hi, in Firefox 102.0.1 (64-bit) I get this error in
voice_client_with_audio_worklet.js
line 72:Uncaught (in promise) DOMException: AudioContext.createMediaStreamSource: Connecting AudioNodes from AudioContexts with different sample-rate is currently not supported.
Context:
My client is running on a different machine than the server. The server runs with a self signed certificate and wss instead of ws. Anyway, the websocket connection is established correctly, this issue raises when I try to open the microphone (line 72).