vosk-server icon indicating copy to clipboard operation
vosk-server copied to clipboard

Sometimes blocking about test_microphone.py

Open YunzhaoLu opened this issue 1 year ago • 3 comments

Using this python script to test microphone connecting to websocket server. https://github.com/alphacep/vosk-server/blob/master/websocket/test_microphone.py
There is blocking (as following) if server side doesn't return response at each data chunk.
while True:
data = await audio_queue.get()
await websocket.send(data)
print (await websocket.recv()) # blocking here waiting for message.

It happened when VAD is applied at server side and no response if data chunk is silent.

YunzhaoLu avatar Jul 06 '24 08:07 YunzhaoLu

Sorry, we do not have VAD. Probably you don't have enough memory on the server and it goes to swap. Try to increase memory.

nshmyrev avatar Jul 28 '24 20:07 nshmyrev

image

It should not relate to memory. Please see this flow. Server drop the silent chunks, and client waits for response, and never send the next chunk. Thank you.

YunzhaoLu avatar Jul 29 '24 00:07 YunzhaoLu

We do not have VAD in our server, it is probably your custom modification.

nshmyrev avatar Jul 29 '24 17:07 nshmyrev