Pre-defined Voices
Relevant source files
The following files were used as context for generating this wiki page:
The voice-elevenlabs plugin provides a set of pre-defined voices from ElevenLabs to enable text-to-speech capabilities within the Claude Code environment. These voices offer different styles and can be easily listed, configured, and used across various commands. The default voice is a natural male voice named "George".
This system allows users to select a preferred voice for all spoken output, including direct speech synthesis, multi-speaker dialogues, and automated voice responses from agents. While the plugin includes a default set of voices, it also provides tools to fetch all voices available in a user's ElevenLabs account. For more advanced use, users can also design entirely new voices using the Create Voice command.
Available Pre-defined Voices
The plugin comes with four default pre-defined voices. These voices can be used by referencing their corresponding ID.
| Voice | ID | Style |
|---|---|---|
| George | JBFqnCBsd6RMkjVDRZzb | Natural male (default) |
| Adam | pNInz6obpgDQGcFmaJgB | Deep male |
| Rachel | 21m00Tcm4TlvDq8ikWAM | Natural female |
| Domi | AZnzlk1XvdvUeBnXmlld | Young female |
| Sources: README.md:67-73, commands/voices.md:9-15, commands/voice-config.md:15-20 |
Managing Voices
Users can manage voices through dedicated commands to list, set, and test voice configurations.
Listing Voices
The /voices command displays the list of default available ElevenLabs voices.
Sources: README.md:27, commands/voices.md:1-4
To get a complete list of all voices available in your ElevenLabs account (including custom ones), you can use the following curl command:
curl -s "https://api.elevenlabs.io/v1/voices" \
-H "xi-api-key: $ELEVENLABS_API_KEY" | jq '.voices[] | {name, voice_id}'
Sources: commands/voices.md:25-28
The following diagram illustrates the process of listing voices.
Sources: commands/voices.md
Configuring the Default Voice
The default voice can be changed either by using the /voice-config command or by setting an environment variable.
Using the /voice-config command
The set-voice action of the /voice-config command updates the default voice ID.
Command:
/voice-config set-voice [voice_id]
Example:
/voice-config set-voice pNInz6obpgDQGcFmaJgB
Sources: commands/voice-config.md:13-14
Using Environment Variables
Set the ELEVENLABS_VOICE_ID environment variable to the desired voice ID.
Command:
export ELEVENLABS_VOICE_ID="pNInz6obpgDQGcFmaJgB"
Sources: README.md:75, commands/voices.md:19-21
This diagram shows the two methods for changing the active voice.
Viewing and Testing the Configuration
The /voice-config command also allows you to view the current settings and test the output.
| Action | Description |
|---|---|
show | Displays the current voice ID and API key status. This is the default action. |
test | Plays a test message ("Voice configuration is working correctly") with the current settings. |
| Sources: commands/voice-config.md:9-24 |
Using the Configured Voice
The selected voice is automatically used by commands and agents that generate speech.
Direct Speech (/speak)
The /speak command uses the configured voice to synthesize text. The implementation can either call the claude-voice-notifications CLI tool or the ElevenLabs API directly, passing the configured voice ID in the API call. The default voice ID for the direct API call example is JBFqnCBsd6RMkjVDRZzb (George).
Sources: commands/speak.md:1-4, 25-30
This sequence diagram shows how the /speak command uses the configured voice ID.
Sources: commands/speak.md:25-30
Multi-Speaker Dialogue (/dialogue)
When generating conversations with the /dialogue command, the first speaker in the script uses the configured default voice. Subsequent speakers are assigned complementary voices, unless a voice is explicitly specified for them in the script.
Example of default voice usage:
/dialogue "Alice: Hey, have you seen the new feature?
Bob: [excited] Yes! It's amazing!"
In this case, "Alice" will use the user's configured default voice.
Sources: commands/dialogue.md:25-27
Voice Assistant Agent
The voice-assistant agent is designed to speak its responses aloud. It uses the configured ElevenLabs voice to maintain a consistent and friendly tone for all its spoken summaries.
Sources: agents/voice-assistant.md:19
Summary
The voice-elevenlabs plugin offers a flexible system for managing and utilizing a set of pre-defined voices. Users can easily list the default voices, fetch a complete list from their account, and set a preferred voice using either the /voice-config command or an environment variable. This configured voice is then consistently applied across all speech-generating functions, ensuring a personalized user experience.