Command: /dialogue
Relevant source files
The following files were used as context for generating this wiki page:The /dialogue command is a feature of the voice-elevenlabs plugin for Claude Code, designed to generate realistic, multi-speaker conversations using the ElevenLabs v3 dialogue mode. It allows users to create audio dialogues directly from a simple script format, complete with emotional cues, natural interruptions, and distinct voices for each speaker.
This command leverages advanced text-to-speech capabilities to produce conversational audio, making it a powerful tool for creating more dynamic and engaging interactions. It is part of a suite of voice commands including [/speak], [/create-voice], and [/voices].
Sources: commands/dialogue.md:2-5, README.md:10-12, 31-32
Command Usage
To use the command, provide a script as a string argument. The script should contain speaker names followed by their lines.
Format
/dialogue "Speaker1: Line of dialogue. Speaker2: [emotion] Another line."
Sources: commands/dialogue.md:37-38
Script Syntax
The dialogue script is written with the speaker's name, a colon, and then their line.
Alice: Hey, have you seen the new feature?
Bob: [excited] Yes! It's amazing!
Alice: [laughs] I knew you'd love it.
Bob: [interrupting] Wait, there's more—
Alice: —I know, the audio tags!
Sources: commands/dialogue.md:10-16
Features
The /dialogue command utilizes ElevenLabs v3 dialogue mode, which provides several key features for creating natural-sounding conversations.
| Feature | Description |
|---|---|
| Natural Interruptions | Speakers can cut each other off by ending a line with a dash (—). |
| Emotional Cues | Inline [audio tags] like [laughs] or [excited] can be added to any speaker's line to convey emotion. |
| Timing Control | The system provides automatic pacing and timing between speakers for a natural flow. |
| Multiple Voices | Different ElevenLabs voices can be assigned to each speaker in the dialogue. |
Sources: commands/dialogue.md:18-25
Audio Tags (Emotion Control)
You can add emotional nuance and non-speech sounds to any line using bracketed tags. This feature is also available in the [/speak] command.
[excited][whispers][laughs]/[laughing][sighs][angry][sad][nervous][shouting][sarcastically]
Sources: README.md:43-52, commands/speak.md:11-20
Voice Assignment
You can control which voice is used for each speaker.
Default Behavior
By default, the first speaker in the dialogue uses the currently configured voice. Subsequent speakers are assigned complementary voices automatically by ElevenLabs.
Sources: commands/dialogue.md:28-30
Explicit Assignment
To assign a specific voice to a speaker, add (voice: VoiceName) after the speaker's name. You can find available voices and their IDs using the [/voices] command.
Alice (voice: Rachel): Hello!
Bob (voice: Adam): Hi there!
The default voice can be changed using the [/voice-config set-voice] command.
Sources: commands/dialogue.md:32-33, commands/voices.md:9-15, commands/voice-config.md:15-16
Execution Flow
The command follows a simple process from script input to audio output. The plugin parses the user's script and uses the ElevenLabs API to generate the final audio.
This diagram illustrates the high-level process for generating dialogue.
Sources: commands/dialogue.md:42-46
The following sequence diagram shows the interaction between the user, the Claude plugin, and the ElevenLabs API.
Sources: commands/dialogue.md:37-38, 42-46
Examples
Simple Conversation
/dialogue "Claude: Task complete! User: [excited] That was fast!"
Sources: commands/dialogue.md:37-38
Conversation with Emotions
/dialogue "Dev: [nervous] Did the tests pass? CI: [cheerfully] All green!"
Sources: commands/dialogue.md:40
Multi-line Dialogue
/dialogue "Alice: Hey, did you see the new feature?
Bob: [excited] Yes! It's incredible!
Alice: [laughs] I knew you'd love it."
Sources: README.md:54-57
Summary
The /dialogue command provides a seamless way to generate high-quality, multi-speaker audio directly within the Claude Code environment. By leveraging ElevenLabs v3's dialogue mode, it supports complex conversational dynamics like interruptions and emotional expressions, making it an essential tool for creating rich, voice-enabled applications and interactions.
Sources: commands/dialogue.md, README.md