Open MarkCarbonell98 opened 2 years ago
Hi @MarkCarbonell98 glad you are finding this package useful.
Do you currently make use of the speechBlob
in the results
array? A possible solution to this memory problem could be adding an option to prevent saving the speechBlob
if you do not need it
Yes, I'm using the package and face the same issue. I think its better if you can introduce an input param to clear the speechBlob. If so then it will be useful.
Hello @Riley-Brown!
First of all, thanks for this amazing NPM package. It has saved me a lot of time implementing my first live-voice-chat browser application.
Expected behavior:
react-speech-to-text
does not make the browser crash due to OOM errors after running for a long time. Current behavior:react-speech-to-text
makes the browser crash out of memory when speech recognition runs long, either in continuous or non-continuous mode. I observed crashes happen after 15min of usage with continuous transcription, or with non-continuous transcription every 30 seconds approximately.Steps to reproduce:
My configuration:
Package version: ^0.8.0
Browser: Chrome version 106.0.5249.103
OS: Windows 11
Possible cause: I have not revised the package's code, but I have the impression that the audio stream used for the speech recognition stores the buffers locally as blobs, which progressively accumulate over time if they are not cleaned up. A useful StackOverflow post to successfully delete blobs might be: https://stackoverflow.com/questions/22899333/delete-javascript-blobs