feat: Add wants_opus method to VoiceAudioSink to indicate PCM audio processing
This commit is contained in:
parent
3824ba9a6c
commit
09a9ced39c
@ -117,6 +117,13 @@ class VoiceAudioSink(voice_recv.AudioSink): # Inherit from voice_recv.AudioSink
|
||||
if not webrtcvad:
|
||||
print("VAD library not loaded. STT might be less efficient or not work as intended.")
|
||||
|
||||
def wants_opus(self) -> bool:
|
||||
"""
|
||||
Indicates whether the sink wants Opus-encoded audio (True) or PCM audio (False).
|
||||
Our sink processes PCM data, so we return False.
|
||||
"""
|
||||
return False
|
||||
|
||||
# Signature changed: user object directly, data is raw 48kHz stereo PCM
|
||||
def write(self, user: discord.User, pcm_data_48k_stereo: bytes):
|
||||
if not webrtcvad or not self.voice_client or not user: # OpusDecoder check removed, user check added
|
||||
|
Loading…
x
Reference in New Issue
Block a user