** EDIT: Never mind, it responds quickly enough **
I am using deepgram live (streaming) speech-to-text for a chat bot. I am having problems getting a transcription after stopping and then starting the mic.
If I stop deepgram every time I stop the mic and start deepgram every time I start the mic, there is no problem, but starting deepgram takes 500-1000 ms and I would prefer to avoid this lag.
I would like to start deepgram upon component mount, and keep deepgram open, and send it audio only when the mic is on.
As I said, when I stop the audio recording and start the audio recording again, deepgram does not transcribe for several seconds, even though audio is being sent to it.
This is the code that does not work:
https://github.com/kerenduchan/deepgram-poc/
The code is React TS. You can clone the repo and run "npm install" then "npm run dev" to use it.
I am attaching the file that needs to be changed in order for it to work (the code where the deepgram connection is restarted each time the mic is turned on)
Please see this video where I explain and demonstrate the issue:
https://www.loom.com/share/c80d561c0c464f26b2c55b26557d53f9