Accessibility Features
Relevant source files
The following files were used as context for generating this wiki page:
The voice-elevenlabs plugin significantly enhances the accessibility of the Claude Code environment by integrating powerful voice capabilities. It provides a suite of features for both text-to-speech (TTS) and speech-to-text (STT), enabling hands-free operation, auditory feedback, and alternative modes of interaction. These features are designed to support users with accessibility needs, those who prefer auditory information, or anyone looking for a more conversational, hands-free workflow.
The core accessibility components include direct speech synthesis, transcription of audio files, and automated voice notifications for key events. The system is built around the ElevenLabs v3 API, offering natural and expressive voice output. The voice-responses skill is explicitly designed to activate for "accessibility needs" and "hands-free usage," forming the foundation of the plugin's accessibility-first approach.
Sources: README.md, skills/voice-responses.md:6-7
Text-to-Speech (TTS) Capabilities
The primary accessibility feature is the ability to convert text into spoken words. This is facilitated through several commands and an overarching voice-assistant agent persona.
Sources: agents/voice-assistant.md, commands/speak.md
The /speak Command
The /speak command is the most direct way to generate speech. It takes text as an argument and uses the configured ElevenLabs voice to speak it aloud. A key feature for expressiveness and clarity is the use of audio tags to control the emotion and delivery of the voice.
Sources: README.md:21, commands/speak.md:9
The following diagram illustrates the process of using the /speak command.
Sources: commands/speak.md:23-29
Supported Emotion Tags
| Tag | Description |
|---|---|
[excited] | Enthusiastic delivery |
[whispers] | Quiet, intimate tone |
[laughs] / [laughing] | Natural laughter |
[sighs] | Thoughtful pause |
[angry] | Intense, frustrated tone |
[sad] | Melancholic delivery |
[nervous] | Hesitant speech |
[shouting] | Loud, emphatic tone |
[sarcastically] | Dry humor |
Sources: README.md:40-49, commands/speak.md:12-20
Multi-Speaker Dialogue
For more complex auditory scenarios, the /dialogue command can generate conversations between multiple speakers. This is useful for understanding conversational flow or reviewing scripts. The system can automatically assign complementary voices to different speakers.
Sources: README.md:53, commands/dialogue.md:9
Voice Assistant Agent
The voice-assistant agent provides a framework for how Claude should behave when voice is enabled. It is instructed to create concise, spoken summaries (1-3 sentences) of its text responses, promoting a natural conversational flow and reducing auditory fatigue.
Sources: agents/voice-assistant.md:9-11, skills/voice-responses.md:18
Speech-to-Text (STT) Transcription
To complement voice output, the plugin provides a speech-to-text capability through the /transcribe command, powered by ElevenLabs Scribe v2. This allows users to convert audio content into written text, which is essential for creating accessible records of meetings, voice memos, or other audio sources.
Sources: README.md:24, commands/transcribe.md:1
Transcription Features
- High Accuracy: Uses state-of-the-art speech recognition.
- Format Support: Handles MP3, WAV, M4A, and other common audio formats.
- Speaker Diarization: Can identify and label different speakers in the audio.
- Timestamps: Provides word-level timing information.
- Language Detection: Supports over 70 languages automatically.
Sources: commands/transcribe.md:9-14
Transcription Flow
The transcription process is initiated by providing a local file path or a URL to an audio file.
Automated Voice Notifications
For a truly hands-free experience, the plugin uses hooks to provide automatic voice notifications for important events within the Claude Code environment. This means users can be audibly alerted to task completions or when their input is required, without needing to constantly monitor the screen.
Sources: README.md:83, hooks/hooks.json
Hook Configuration
The hooks.json file defines which events trigger a voice notification.
| Event | Description | Script |
|---|---|---|
Stop | Triggers when Claude finishes a response. | stop-voice.sh |
SubagentStop | Triggers when a subagent task completes. | subagent-voice.sh |
Notification | Triggers when Claude needs permission or input. | claude-voice-notifications |
Sources: hooks/hooks.json:3-18
Notification Logic
The shell scripts (stop-voice.sh, subagent-voice.sh) construct a concise message and pipe it to the claude-voice-notifications utility, which handles the TTS conversion. The messages are context-aware, often including the project name to provide more useful information.
The following diagram shows the event-to-audio pipeline for hooks.
For example, the subagent-voice.sh script attempts to create a message like [project]: [short task description] to give a clear, audible summary of what was completed.
Sources: hooks/scripts/subagent-voice.sh:26
Voice Customization
Users can customize the voice to suit their preferences, which is an important aspect of accessibility.
Voice Selection
A list of default voices is available, and the active voice can be changed by setting the ELEVENLABS_VOICE_ID environment variable. The /voices command lists available options.
Sources: README.md:79-80, commands/voices.md:16
Custom Voice Creation
For ultimate personalization, the /create-voice command allows users to design a new AI voice from a text description. Users can specify attributes like age, gender, accent, and tone to generate a voice that meets their specific needs or preferences.
Sources: README.md:23, commands/create-voice.md:1
Configuration Management
The /voice-config command allows users to view their current voice settings, set a new voice, and test the configuration to ensure it's working correctly.
Sources: commands/voice-config.md:1
Conclusion
The accessibility features within the voice-elevenlabs plugin provide a comprehensive framework for non-visual and hands-free interaction with Claude Code. By combining direct text-to-speech commands, automated event-driven notifications, and speech-to-text transcription, the plugin lowers barriers to access and offers a more flexible, conversational, and efficient user experience. The ability to customize and create voices further ensures that users can tailor the auditory feedback to their personal comfort and needs.