Sending KeepAlive's but still getting connection closed - (Speech to Text in Browser-side JavaScript) #1041
Replies: 6 comments 4 replies
-
Thanks for asking your question. Please be sure to reply with as much detail as possible so the community can assist you efficiently. |
Beta Was this translation helpful? Give feedback.
-
Hey there! It looks like you haven't connected your GitHub account to your Deepgram account. You can do this at https://community.deepgram.com - being verified through this process will allow our team to help you in a much more streamlined fashion. |
Beta Was this translation helpful? Give feedback.
-
It looks like we're missing some important information to help debug your issue. Would you mind providing us with the following details in a reply?
|
Beta Was this translation helpful? Give feedback.
-
I see multiple errors in our logs for this request: Error: Deepgram received an empty file or url rather than valid audio data Error: A non-audio file was sent to Deepgram. Error: Query parameter Suggestion: Ask the customer to set Error: The customer sent a base64 encoded audio file.
|
Beta Was this translation helpful? Give feedback.
-
Ok that’s helpful to know what’s going on. I still need some help I think. So basically the encoding is erroring but hasn’t been an issue because most of the time I’m getting correct transcriptions back. This also means I’m sending the correct audio binary data and not base64. Is it getting confused between the binary data and the JSON messages? My use case is I only send audio data when the person is speaking, so in between audio data I need to send keepalives since it could be a minute or two between speaking. If I have to remove the keepalives and also Finalize json messages that could be a problem for me. Any suggestions are much appreciated thank you |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hi,
Here's a screenshot of my logs:
As you can see it shows the times the KeepAlives are sent, when you see "SpeechStart" that is when it is streaming audio data.
It seems that after a while, if I send any audio data then Deepgram sends me a "Metadata" message and immediately closes the stream without any other message or error code as to why.
The following are the last websocket messages I see before closing and the code I am using, and confirmation the KeepAlive messages are getting through:
...Client version is latest (3.9)
Example request ID: aba8eea6-7f11-46be-ac85-337bd1019cd1
Beta Was this translation helpful? Give feedback.
All reactions