diff --git a/discord/gateway.py b/discord/gateway.py index faca4b920..3de52a0ce 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -1014,6 +1014,7 @@ class DiscordVoiceWebSocket: 'd': { 'speaking': int(state), 'delay': 0, + 'ssrc': self._connection.ssrc, }, } @@ -1089,7 +1090,11 @@ class DiscordVoiceWebSocket: async def load_secret_key(self, data: Dict[str, Any]) -> None: _log.debug('Received secret key for voice connection.') self.secret_key = self._connection.secret_key = data['secret_key'] - await self.speak() + + # Send a speak command with the "not speaking" state. + # This also tells Discord our SSRC value, which Discord requires + # before sending any voice data (and is the real reason why we + # call this here). await self.speak(SpeakingState.none) async def poll_event(self) -> None: