Discord · AsyncAPI Specification
Discord Voice API
Version 10
The Discord Voice API provides the protocol for establishing and managing voice connections between clients and Discord voice servers. It handles UDP-based voice data transmission, encryption with XSalsa20-Poly1305, and supports features like speaking indicators and voice state updates. The voice connection lifecycle begins via the main Gateway with Opcode 4 (Update Voice State) and continues with a dedicated voice WebSocket.
Channels
/
Send message to voice server
Messages
VoiceIdentify
Voice Identify (Opcode 0)
Begin a voice WebSocket connection
SelectProtocol
Select Protocol (Opcode 1)
Select the voice protocol and provide connection details
VoiceHeartbeat
Voice Heartbeat (Opcode 3)
Sent periodically to maintain the voice connection
Speaking
Speaking (Opcode 5)
Indicate speaking status
VoiceResume
Voice Resume (Opcode 7)
Resume a voice connection
VoiceReady
Voice Ready (Opcode 2)
Voice server is ready, provides connection information
SessionDescription
Session Description (Opcode 4)
Voice session description with encryption details
VoiceHeartbeatAck
Voice Heartbeat ACK (Opcode 6)
Acknowledgment of a voice heartbeat
VoiceHello
Voice Hello (Opcode 8)
Received after connecting, contains heartbeat interval
VoiceResumed
Voice Resumed (Opcode 9)
Voice connection successfully resumed
ClientDisconnect
Client Disconnect (Opcode 13)
A user disconnected from the voice channel
Servers
wss
voice
wss://{voice_server_hostname}/?v=8
Discord Voice WebSocket server (endpoint provided via VOICE_SERVER_UPDATE)