Discord Voice Trigger
AI-generatedOverview
The Discord Voice Trigger node enables workflows to be triggered based on voice activity within Discord voice channels. It supports multiple modes such as detecting when users start or stop speaking, recording voice audio, and monitoring users joining or leaving voice channels. This node is useful for automating actions in response to voice interactions on Discord servers, such as logging voice activity, transcribing audio, or reacting to user presence in voice channels.
Use Case Examples
- Trigger a workflow when a user starts speaking in a specific Discord voice channel to log voice activity.
- Record voice audio from a Discord voice channel and save the recording or transcribe it to text using an external transcription service.
- Trigger actions when users join or leave voice channels, such as sending notifications or updating user status.
Properties
| Name | Meaning |
|---|---|
| Voice Trigger Mode | Selects how the voice trigger should work, e.g., voice activity detection, voice recording, or join/leave channel monitoring. |
| Server Names or IDs | Select one or more Discord servers to monitor for voice events. |
| Voice Channel Names or IDs | Select specific voice channels to monitor; if none selected, all channels are monitored. |
| Recording Options | Options for voice recording mode, including audio format, max duration, silence timeout, multi-speaker recording, and minimum speaking duration. |
| Transcription | Options to enable and configure transcription of recorded audio using external services like OpenAI Whisper, Google Speech-to-Text, or an external webhook. |
| User Filters | Filters to restrict triggers to specific user roles, ignore bots, or monitor specific user IDs. |
| Additional Options | Additional settings such as bot auto-join/leave behavior, debounce time, inclusion of user metadata, and options to save recordings to files. |
Output
Binary
Audio recording data in various formats (e.g., OGG, PCM, WebM) when voice recording mode is used.
JSON
userId- ID of the user involved in the voice event.userName- Username of the user.userDiscriminator- User discriminator (unique tag) on Discord.guildId- ID of the Discord server (guild).guildName- Name of the Discord server.channelId- ID of the voice channel.channelName- Name of the voice channel.timestamp- Timestamp of the event.action- Type of voice event action (e.g., joined, left, moved, started_speaking, stopped_speaking).selfMuted- Whether the user is self-muted.selfDeaf- Whether the user is self-deafened.serverMuted- Whether the user is server-muted.serverDeaf- Whether the user is server-deafened.streaming- Whether the user is streaming.video- Whether the user has video enabled.duration- Duration of the voice recording (if applicable).format- Audio format of the recording.audioSize- Size of the audio data in bytes.audioData- Base64 encoded audio data buffer.filePath- File path where the recording is saved (if applicable).transcription- Transcribed text from the audio (if transcription is enabled).transcriptionConfidence- Confidence score of the transcription.transcriptionLanguage- Language code of the transcription.
Dependencies
- Discord Bot API token credential for authentication
- External transcription services such as OpenAI Whisper or Google Speech-to-Text if transcription is enabled
Troubleshooting
- Ensure a valid Discord Bot API token is provided; otherwise, the node will not connect to Discord.
- If no servers (guilds) are selected before choosing voice channels or roles, the node will throw an error prompting to select at least one server.
- Connection issues to the IPC server may cause the node to stop receiving voice events; check logs for 'Disconnected from IPC server' errors.
- If no audio buffer is received during recording, the node will warn that no audio data was captured; verify recording settings and permissions.
- Errors from the voice trigger are logged and thrown as node operation errors; check error messages for details and ensure the bot has appropriate permissions.
Links
- Discord Voice Trigger Documentation - Official documentation for configuring and using the Discord Voice Trigger node in n8n.
- Discord Developer Portal - Official Discord API documentation for bot development and voice features.
- OpenAI Whisper - Information about the OpenAI Whisper transcription service used for audio transcription.