#Getting error 1011 for streaming transcription no matter what 🥺

1 messages · Page 1 of 1 (latest)

cobalt root
#

Hello there!
I'm trying to use Deepgram's streaming transcription functionality but I always get this error:

<Task finished name='Task-23' coro=<AsyncLiveClient._start() done, defined at /Users/giovannidelgallo/PycharmProjects/glaut-back/venv/lib/python3.10/site-packages/deepgram/clients/live/v1/async_client.py:91> exception=ConnectionClosedError(Close(code=1011, reason='Deepgram did not provide a response message within the timeout window. See https://dpgr.am/net0000'), Close(code=1011, reason='Deepgram did not provide a response message within the timeout window. See https://dpgr.am/net0000'), True)>

I am sending 200ms WAV audio chunks from my FE trough a WS connection, and the chunks themselves seem to arrive correctly, however whenever I try doing this:

    if "bytes" in message:
        audio_data = message["bytes"]
        print(f"SENDING {len(audio_data)} BYTES")
        await self.dg_connection.send(audio_data)

Nothing happens (except for the print) and some seconds later I get the error above.
Am I doing something wrong?

Thanks in advance!

Deepgram

Power your apps with real-time speech-to-text and text-to-speech APIs powered by Deepgram's voice AI models. Low latency, high quality, and low cost that scales

raven solarBOT
#

Thanks for asking your question. Please be sure to reply with as much detail as possible so we can assist you efficiently. Such as:

  • Provide the request_id if you've a question about a transcription response.
  • The options you used or the api.deepgram.com URL you sent your request to, including parameters.
  • Any code snippets you can include.
  • Any audio you can include, or if you can't share it here please email it to us at [email protected] and provide a link to this thread.
wide nest
#

Hi @cobalt root

That appears to be the usual disconnect message when the audio stream doesn't match the encoding set in the LiveOptions parameter. I would double check that and you are using WAV, sample rate must be set correctly.

cobalt root
#

It seems that the issue was caused by empty payloads. Is this possible?