pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Include silence in recording sink for the full length

Open TheBluekr opened this issue 1 year ago • 1 comments

Summary

Add the option to include silence packets Discord sends in a sink for the duration of a recording.

What is the feature request for?

The core library

The Problem

Currently pycord drops any silent packets sent by Discord and thus won't be included in the recording. With this it could also be easier to combine audio from multiple users into a single audio file with more proper timings.

The Ideal Solution

Atleast include silent packets in the recording allowing the recording of users to be full length.

The Current Solution

No response

Additional Context

No response

TheBluekr avatar Aug 31 '22 13:08 TheBluekr

A good solution for this would be an opt-in argument like include_silence=boolean

Icebluewolf avatar Aug 31 '22 13:08 Icebluewolf

Discord doesn't actually send all silence packets. It only sends 5 frames of silence of to indicate the start of silence.

A workaround is in works in #1984. Although it relies on timestamp of receipt of packets to figure out silence, which is dependent on the network. This isn't ideal, but network also affects any normal user connected to a Voice Channel, so it is fair enough.

OmLanke avatar Apr 02 '23 18:04 OmLanke