OpenClaw in Discord voice channels
The setup checklist, join, auto-join and residency allowlists, the three voice modes, GPT-Live versus host-controlled turns, wake names, barge-in, and per-speaker connections
A voice channel is a different animal from a chat: continuous audio, several speakers, interruptions, and playback that must not talk over itself. OpenClaw’s Discord plugin supports realtime voice channels as well as the separate voice-message attachment format. The docs page for voice channels is long and dense; here are the checklist and commands, the configuration, the three conversation modes and the GPT-Live route, how speakers and sessions map onto each other, wake names and barge-in, and the occupancy and residency rules.
Setup, commands, config
- Six steps: enable the message content intent, enable the server members intent when role or user allowlists are used, invite the bot with the bot and application-commands scopes, grant connect, speak, send messages and read message history in the target voice channel, enable native commands, and configure the voice block. The join, status and leave commands are slash commands typed in Discord, use the account default agent and follow the same allowlist and group policy rules as other commands, and a capabilities check on the channel target shows the bot’s effective permissions before joining.
- Voice is opt-in for text-only configs: enabling it turns on the commands, the voice runtime and the voice-states intent. The config carries an enabled flag, an optional model that overrides the agent brain for voice responses, auto-join entries with a guild, a channel and a when-occupied flag, an allowed-channels residency list, DAVE encryption and decryption-failure tolerance passed through to the voice library, connect and reconnect timeouts, and a realtime block with a provider, a model and a speaker voice.
- Discord can use the same GPT-Live model and voice as the other voice surfaces, sharing provider resolution, native delegation and interruption policy while keeping its own transport; unpinned configs keep the provider’s default, so GPT-Live is selected explicitly, with the Codex route after a provider login and the public API route with its own supported voices, and model and voice must belong to the same route. GPT-Live owns response timing and interruption, plays continuous audio without waiting for a completed-response event, keeps the microphone admitted during playback so it can hear interruptions itself, and rejects host-enforced wake-name gating or a forced consult before every reply at startup.
- Auto-join with when-occupied on keeps the bot in a room only while at least one human is present, joining on the first arrival and leaving after the last departure, with bots not counted and startup reconciling from Discord’s voice-state roster; occupancy management owns only sessions it joined, so manual joins, transcript-only sessions and follow sessions are left alone. The allowed-channels list restricts joins, auto-joins and moves to listed entries, an empty list denies all joins, and a bot moved outside the list leaves and rejoins its configured target.
Discord has two distinct voice surfaces: realtime voice channels (continuous conversations) and voice message attachments (the waveform preview format).
Modes, speakers, sessions
Three modes: agent-proxy, the default, where a realtime voice front end handles turn timing, interruption and playback and delegates substantive work to the routed OpenClaw agent through a consult tool, treating the result like a typed prompt from that speaker; STT-TTS, the older batch transcription plus speech synthesis flow; and bidi, where the realtime model converses directly while exposing the consult tool for the OpenClaw brain. Each speaker’s audio has its own provider connection so delayed transcripts and tool calls keep that speaker’s Discord identity, everyone shares one routed agent conversation and one room playback queue, the room retains at most eight speaker connections and reclaims idle ones, and a failed speaker connection leaves the others connected. An agent session target can make a voice channel the microphone and speaker of an existing text channel session, such as a maintainers channel, so voice turns use that channel’s routed session and agent. Agent-proxy hides the agent’s own TTS tool because Discord owns playback, gives owner speakers owner-equivalent tool access by default, and with host-controlled turns strongly prefers consulting the agent before substantive answers, queueing later exact-speech answers until playback idles rather than cutting a sentence.
Wake names, barge-in, profiles
- In the OpenAI agent-proxy mode wake-name gating adapts to the room: one human talks naturally, two or more must start or end a turn with a wake name, bots do not count, an explicit setting forces it always or never, configured names must be one or two words and default to the agent name plus OpenClaw, and an active gate disables provider auto-response, routes accepted turns through the consult path and speaks a short acknowledgement when an exact leading wake name is recognised from partial transcription, while fuzzy matching waits for the final transcript.
- For response-based models a barge-in setting decides whether audible microphone input interrupts playback, silent packets and speaker-start notifications alone never do, a minimum playback duration of 250 milliseconds before a truncation guards against echo and can be raised for echo-heavy rooms or zeroed for instant interruption, and GPT-Live ignores both because it owns interruption. Realtime audio is buffered when Discord playback falls behind, each provider response keeps its own audio including native tool continuations, and interruptions truncate retained audio at the amount Discord consumed.
- Realtime modes inject the small identity, user and soul profile files into the provider instructions by default so fast direct turns keep the same persona, configurable to a subset or none, with the agents file staying in normal agent context and the consult tool still owning workspace work, facts, memory and tool actions. Joining sends the routed session a silent roster event, later joins and leaves update it without a spoken reply, display names are untrusted labels, voice turns and commands take owner status from the Discord command owners, and the bundled WebAssembly Opus codec handles receive and playback without native addons.
OpenClaw on Discord is the channel this voice surface belongs to, and Discord voice transcripts and meeting notes the separate listen-only capture that can share the same connection.
Choosing a mode
Agent-proxy is the default because it keeps the OpenClaw agent as the brain and the realtime model as the mouth; bidi trades that for speed with the consult tool in reserve; STT-TTS is the fallback for providers without realtime. Follow users in Discord voice covers the mode where the bot moves with selected users instead of sitting in a fixed room, and OpenClaw models and providers the providers behind the brain and the realtime front end.
On Diali
On Diali the Discord bot is connected from the dashboard; the realtime voice surface needs the voice block and a realtime provider, which is not a dashboard switch today, so treat it as a self-run feature until it is. Hosted OpenClaw on Diali is the assistant and Diali security describes the boundary the voice front end would sit inside.
- Six steps, three commands, three modes.
- One provider connection per speaker, one playback queue per room.
- Wake names adapt to the head count; GPT-Live owns interruption.
Stop reading about it, build one
Set up an agent, pick a channel, and have it working inside the app you already keep open.
