KoljaB / RealtimeSTT

A robust, efficient, low-latency speech-to-text library with advanced voice activity detection, wake word activation and instant transcription.
MIT License
2.09k stars 190 forks source link

reworked mic reconnection on errors #136

Open sangheonEN opened 4 weeks ago

sangheonEN commented 4 weeks ago

The audio device might still be in the process of resetting when you attempt to reinitialize it after calling terminate(). When the interface is terminated, the system might not immediately recognize the microphone device (especially if it was briefly disconnected), leading to the "No Default Input Device Available" error.

By removing the termination step, you avoid fully closing the interface, allowing the device to reconnect more smoothly.

image