Talk with AIRI on Discord
AIRI can participate in your Discord community just like any human friend, responding in voice channels and text chats.
What You Can Do (Function-First)
| Scenario | User Action | Result |
|---|---|---|
| Summon in Voice | Type /summon while connected to a voice channel | AIRI joins, greets the room, and listens for speech |
| Private DM | Open a DM with the bot | Chat one-on-one; messages appear with Markdown formatting |
| Slash Commands | /ping, /model switch llama3 | Quick tooling to check latency or change LLM |
| Leave Channel | /bye | Bot disconnects politely |
Tip: AIRI uses the same Character Card so the personality feels identical to the desktop pet.
Quick Setup (2 Minutes)
- Go to Settings → Integrations → Discord in the desktop app.
- Click Generate Bot (one-click script) or paste an existing Bot Token.
- Follow the OAuth link to add the bot to your server with
Send Messages,Read Messages,Connect,Speakpermissions. - In any voice channel, type
/summon— AIRI joins and starts chatting!
How It Works (Conceptual)
- Voice Gateway —
@discordjs/voicestreams Opus audio from Discord to the AIRI Discord service. - Audio Converter — The bot converts Opus → PCM → WAV before sending to the same VAD/STT pipeline used on desktop.
- Unified LLM Brain — The text goes to the central LLM; the response comes back.
- TTS & Playback — The reply is chunked, synthesized, then streamed back into the voice connection.
- Slash Command Interface — Simple REST helpers register
/summon,/bye,/ping,/modelon startup.
Sequence Diagram:
Best Practices
- Use a Music or AI voice channel to avoid noise in main lobbies.
- For privacy, switch the STT provider to local Whisper; audio never leaves your server.
- The bot auto-disconnects after 5 minutes of silence to save resources.
Related Technical Files
| Functional Role | Code File | Description |
|---|---|---|
| Discord Bot Entry | services/discord-bot/src/index.ts | Initializes client, registers slash commands |
| Voice Pipeline | services/discord-bot/src/pipelines/tts.ts | Handles Opus ↔ WAV, STT, TTS |
| Command Handlers | services/discord-bot/src/commands/*.ts | /summon, /bye, /ping implementations |
| Provider Bridge | packages/server-sdk/src/client.ts | WebSocket link to central LLM service |