You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Occasionally, Opus decode errors will prevent getting sane audio data from stream
Reproduction Steps
This bug occurs inconsistently. Simply connecting to a voice channel and trying to receive data with start_recording is enough to cause it to occur, but sometimes, I'll start a voice channel with no issue. My assumption is there is some underlying internal inconsistency in what format Discord is using, and when it chooses a particular format, it fails. This is occurring with master and the most recent release candidate.
Minimal Reproducible Code
Expected Results
Like in previous versions, the audio to record without error.
Actual Results
Note: this error only appeared after I manually added a traceback.print_exc line in opus.py:
Traceback (most recent call last):
File "/home/user/miniconda3/lib/python3.13/site-packages/discord/opus.py", line 549, in run
data.decoded_data = self.get_decoder(data.ssrc).decode(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
data.decrypted_data
^^^^^^^^^^^^^^^^^^^
)
^
File "/home/user/miniconda3/lib/python3.13/site-packages/discord/opus.py", line 514, in decode
ret = _lib.opus_decode(
self._state, data, len(data) if data else 0, pcm_ptr, frame_size, fec
)
File "/home/user/miniconda3/lib/python3.13/site-packages/discord/opus.py", line 131, in _err_lt
raise OpusError(result)
discord.opus.OpusError: corrupted stream
Summary
Occasionally, Opus decode errors will prevent getting sane audio data from stream
Reproduction Steps
This bug occurs inconsistently. Simply connecting to a voice channel and trying to receive data with
start_recordingis enough to cause it to occur, but sometimes, I'll start a voice channel with no issue. My assumption is there is some underlying internal inconsistency in what format Discord is using, and when it chooses a particular format, it fails. This is occurring withmasterand the most recentrelease candidate.Minimal Reproducible Code
Expected Results
Like in previous versions, the audio to record without error.
Actual Results
Note: this error only appeared after I manually added a
traceback.print_excline inopus.py:Intents
intents = discord.Intents.default(); intents.members = True
System Information
Checklist
Additional Context
No response