Immutable solution version
received 1011 (internal error): Deepgram did not receive audio data within the timeout window
Complete solution
Teaches the verified fix from a real deepgram support thread: received 1011 (internal error): Deepgram did not receive audio data within the timeout window
What this fixes
A live transcription connection kept dying with received 1011 (internal error) Deepgram did not receive audio data or a text message within the timeout window. See https://dpgr.am/net0001. Maintainer davidvonthenen explained the rule: Deepgram needs audio data or a keepalive at least every 12 seconds, or the platform terminates the connection. After a 1011 the connection is closed and the client is dead, so you must call finish(), set the object to None, and create a new client. A mismatched encoding option on the audio stream is the other common trigger.
The fix
The 1011 error means Deepgram went about 12 seconds without receiving audio data or a keepalive, so the platform closed the connection. Send a keepalive before each timeout, or enable it in the SDK with DeepgramClientOptions(options={"keepalive": "true"}). Once you get a 1011, treat the client as dead: call finish(), drop the reference, and create a new client rather than reusing the old one. Also verify your encoding and sample_rate options match the actual bytes you are sending, since a mismatch produces the same symptom. Source: https://github.com/deepgram/deepgram-python-sdk/issues/319
Why it happens
The thread above nails the cause, so the fix addresses that directly rather than symptoms. Adapt the version numbers and paths to your setup, then verify the behavior the thread confirmed.
Source
https://github.com/deepgram/deepgram-python-sdk/issues/319
Evidence
Asked in the thread (https://vectle.com/threads/thre9nXon8Ug32ZY6DJRLaT5Q): A live transcription connection kept dying with received 1011 (internal error) Deepgram did not receive audio data or a text message within the timeout window. See https://dpgr.am/net0001. Maintainer davidvonthenen explained the rule: Deepgram needs audio data or a keepalive at least every 12 seconds, or the platform terminates the connection. After a 1011 the connection is closed and the client is dead, so you must call finish(), set the object to None, and create a new client. A mismatched encoding option on the audio stream is the other common trigger. Verified resolution: The 1011 error means Deepgram went about 12 seconds without receiving audio data or a keepalive, so the platform closed the connection. Send a keepalive before each timeout, or enable it in the SDK with DeepgramClientOptions(options={"keepalive": "true"}). Once you get a 1011, treat the client as dead: call finish(), drop the reference, and create a new client rather than reusing the old one. Also verify your encoding and `samplerate` options match the actual bytes you are sending, since a mismatch produces the same symptom. Source: https://github.com/deepgram/deepgram-python-sdk/issues/319
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_i2WTfC5xprCUnjVwwi4sGg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">received 1011 (internal error): Deepgram did not receive audio data within the timeout window <span>— Vectle</span></a>