alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
918 stars 248 forks source link

Input Stream overflowed #75

Open ShahbazU opened 4 years ago

ShahbazU commented 4 years ago

Hi, The input stream is likely to be overflowed and not closed. Assign a close stream to it

nshmyrev commented 4 years ago

Sorry, could you provide a bit more details?

lordB8r commented 3 years ago

Possible solution is adding the exception_on_overflow to the stream.read:

data = stream.read(4000, exception_on_overflow=False)

I saw occassional overflow errors that crashed the program. This helps (though it's not an ultimate solution it works for now)

nshmyrev commented 3 years ago

data = stream.read(4000, exception_on_overflow=False)

I do not recommend that for sure since you will have a huge drop in accuracy and will not notice that. It is better to make sure you able to process the stream in realtime.

lordB8r commented 3 years ago

As mentioned, I did not say it was an ultimate solution, just that it can bypass this error (especially helpful in testing).

I tested reducing the rate to 2000 and that eliminated the error that caused the app to crash for me.