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

Input Stream overflowed

Open ShahbazU opened this issue 4 years ago • 4 comments

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

ShahbazU avatar Oct 22 '20 10:10 ShahbazU

Sorry, could you provide a bit more details?

nshmyrev avatar Oct 22 '20 10:10 nshmyrev

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)

lordB8r avatar Nov 02 '20 21:11 lordB8r

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.

nshmyrev avatar Nov 02 '20 21:11 nshmyrev

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.

lordB8r avatar Nov 05 '20 16:11 lordB8r