-
-
Notifications
You must be signed in to change notification settings - Fork 482
Open
Labels
unconfirmed bugA bug report that needs triagingA bug report that needs triaging
Milestone
Description
Summary
The audio_recording.py and audio_recording_merged.py examples reuse the same sink instances for multiple recordings. This throws an error. It is unclear if this is an issue with the sinks code or the examples.
Reproduction Steps
- Run one of the examples mentioned above.
- Join a voice channel
- Run
/start
- Make some noise
- Run
/stop
- Stay in the voice channel
- Run
/start
and make some noise - Observe the error in the console
- If you run
/stop
at this point the console will be spammed with "Decoder Process Killed" indefinitely.
Minimal Reproducible Code
Expected Results
No error
Actual Results
Exception in thread DecodeManager:
Traceback (most recent call last):
File "Python312\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "pycord\discord\opus.py", line 556, in run
self.client.recv_decoded_audio(data)
File "pycord\discord\voice_client.py", line 943, in recv_decoded_audio
self._process_audio_packet(data)
File "pycord\discord\voice_client.py", line 994, in _process_audio_packet
self.sink.write(data.decoded_data, self.ws.ssrc_map[data.ssrc]["user_id"])
File "pycord\discord\sinks\core.py", line 84, in _filter
return func(self, data, user)
^^^^^^^^^^^^^^^^^^^^^^
File "pycord\discord\sinks\core.py", line 232, in write
file.write(data)
File "pycord\discord\sinks\core.py", line 154, in write
raise SinkException("The AudioData is already finished writing.")
discord.sinks.errors.SinkException: The AudioData is already finished writing.
Intents
default
System Information
- Python v3.12.4-final
- py-cord v2.7.None-candidate
- py-cord importlib.metadata: v2.7.0rc2.dev62+g3b8b79f20.d20250914
- aiohttp v3.10.5
- system info: Windows 11 10.0.26100
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
- I have removed my token from display, if visible.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
unconfirmed bugA bug report that needs triagingA bug report that needs triaging