The WebSocket connection to Deepgram abruptly closes while using live speech or live listen while running locally. I haven't tried this in production yet. There is no error event fired before closing, I get a metadata event after it is closed. so it is difficult to diagnose what has happened. The sample metadata event for live listen is as follows for reference:
One might argue that opening a new connection to deepgram for each new client connected to websocket server is the issue, but its not working even when a single client is connected locally.
What is the current behavior?
The WebSocket connection to Deepgram abruptly closes while using live speech or live listen while running locally. I haven't tried this in production yet. There is no error event fired before closing, I get a metadata event after it is closed. so it is difficult to diagnose what has happened. The sample metadata event for live listen is as follows for reference:
Also checking the request id in deepgram's account shows no error.
Steps to reproduce
It happens occasionally while the server is running, initiate a live listen and live speech connection and it terminates frequently.
Expected behavior
The connection should remain open until explicitly closed, or any error occurs.
Please tell us about your environment
Other information
I am attaching the code for both the speech to text and text to speech module below:
One might argue that opening a new connection to deepgram for each new client connected to websocket server is the issue, but its not working even when a single client is connected locally.