A voice notification server for the Personal AI Infrastructure (PAI) system that provides text-to-speech notifications using ElevenLabs API.
Quick Start: See QUICKSTART.md for a 5-minute setup guide (if available).
- ElevenLabs Integration: High-quality AI voices for notifications
- Multiple Voice Support: Different voices for different AI agents
- macOS Service: Runs automatically in the background
- Menu Bar Indicator: Visual status indicator in macOS menu bar
- Simple HTTP API: Easy integration with any tool or script
- macOS (tested on macOS 11+)
- Bun runtime installed
- ElevenLabs API key (required for voice functionality)
curl -fsSL https://bun.sh/install | bashAdd your ElevenLabs API key to ~/.env:
echo "ELEVENLABS_API_KEY=your_api_key_here" >> ~/.env
echo "ELEVENLABS_VOICE_ID=s3TPKV1kjDlVtZbl4Ksh" >> ~/.envGet your free API key at elevenlabs.io (10,000 characters/month free)
cd ~/.claude/voice-server
./install.shThis will:
- Install dependencies
- Create a macOS LaunchAgent for auto-start
- Start the voice server on port 8888
- Verify the installation
- Optionally install menu bar indicator (requires SwiftBar/BitBar)
./start.sh
# or
launchctl load ~/Library/LaunchAgents/com.pai.voice-server.plist./stop.sh
# or
launchctl unload ~/Library/LaunchAgents/com.pai.voice-server.plist./restart.sh./status.sh./uninstall.shThis will stop the service and remove the LaunchAgent.
curl -X POST http://localhost:8888/notify \
-H "Content-Type: application/json" \
-d '{
"message": "Task completed successfully",
"voice_id": "s3TPKV1kjDlVtZbl4Ksh",
"voice_enabled": true
}'message(required): The text to speakvoice_id(optional): ElevenLabs voice ID to usevoice_enabled(optional): Whether to speak the notification (default: true)title(optional): Notification title (default: "PAI Notification")
// PAI System Agents
Kai: s3TPKV1kjDlVtZbl4Ksh // Main assistant
Perplexity-Researcher: AXdMgz6evoL7OPd7eU12 // Perplexity research agent
Claude-Researcher: AXdMgz6evoL7OPd7eU12 // Claude research agent
Gemini-Researcher: iLVmqjzCGGvqtMCk6vVQ // Gemini research agent
Engineer: fATgBRI8wg5KkDFg8vBd // Engineering agent
Principal-Engineer: iLVmqjzCGGvqtMCk6vVQ // Principal engineering agent
Designer: ZF6FPAbjXT4488VcRRnw // Design agent
Architect: muZKMsIDGYtIkjjiUS82 // Architecture agent
Pentester: xvHLFjaUEpx4BOf7EiDd // Security agent
Artist: ZF6FPAbjXT4488VcRRnw // Artist agent
Writer: gfRt6Z3Z8aTbpLfexQ7N // Content agentThe voice server includes an optional menu bar indicator that shows the server status.
- Install SwiftBar (recommended) or BitBar:
brew install --cask swiftbar
# OR
brew install --cask bitbar- Run the menu bar installer:
cd ~/.claude/voice-server/menubar
./install-menubar.sh- Visual Status: ποΈ (running) or ποΈβ« (stopped)
- Quick Controls: Start/Stop/Restart server from menu
- Status Info: Shows voice type (ElevenLabs)
- Quick Test: Test voice with one click
- View Logs: Access server logs directly
If you prefer manual installation:
- Copy
menubar/pai-voice.5s.shto your SwiftBar/BitBar plugins folder - Make it executable:
chmod +x pai-voice.5s.sh - Refresh SwiftBar/BitBar
Required:
ELEVENLABS_API_KEY=your_api_key_hereOptional:
PORT=8888 # Server port (default: 8888)
ELEVENLABS_VOICE_ID=s3TPKV1kjDlVtZbl4Ksh # Default voice ID (Kai's voice)The voices.json file provides reference metadata for agent voices:
{
"default_rate": 175,
"voices": {
"kai": {
"voice_name": "Jamie (Premium)",
"rate_multiplier": 1.3,
"rate_wpm": 228,
"description": "UK Male - Professional, conversational",
"type": "Premium"
},
"researcher": {
"voice_name": "Ava (Premium)",
"rate_multiplier": 1.35,
"rate_wpm": 236,
"description": "US Female - Analytical, highest quality",
"type": "Premium"
},
"engineer": {
"voice_name": "Zoe (Premium)",
"rate_multiplier": 1.35,
"rate_wpm": 236,
"description": "US Female - Steady, professional",
"type": "Premium"
},
"architect": {
"voice_name": "Serena (Premium)",
"rate_multiplier": 1.35,
"rate_wpm": 236,
"description": "UK Female - Strategic, sophisticated",
"type": "Premium"
},
"designer": {
"voice_name": "Isha (Premium)",
"rate_multiplier": 1.35,
"rate_wpm": 236,
"description": "Indian Female - Creative, distinct",
"type": "Premium"
},
"artist": {
"voice_name": "Isha (Premium)",
"rate_multiplier": 1.35,
"rate_wpm": 236,
"description": "Indian Female - Creative, artistic",
"type": "Premium"
},
"pentester": {
"voice_name": "Oliver (Enhanced)",
"rate_multiplier": 1.35,
"rate_wpm": 236,
"description": "UK Male - Technical, sharp",
"type": "Enhanced"
},
"writer": {
"voice_name": "Serena (Premium)",
"rate_multiplier": 1.35,
"rate_wpm": 236,
"description": "UK Female - Articulate, warm",
"type": "Premium"
}
}
}Note: The actual ElevenLabs voice IDs are configured in the hook files (hooks/stop-hook.ts and hooks/subagent-stop-hook.ts), not in voices.json.
Check server status:
curl http://localhost:8888/healthResponse:
{
"status": "healthy",
"port": 8888,
"voice_system": "ElevenLabs",
"default_voice_id": "s3TPKV1kjDlVtZbl4Ksh",
"api_key_configured": true
}- Check if another service is using port 8888:
lsof -ti:8888
- Kill the process if needed:
lsof -ti:8888 | xargs kill -9
- Verify ElevenLabs API key is configured:
grep ELEVENLABS_API_KEY ~/.env - Check server logs:
tail -f ~/.claude/voice-server/logs/voice-server.log - Test the API directly:
curl -X POST http://localhost:8888/notify \ -H "Content-Type: application/json" \ -d '{"message":"Test message","voice_id":"s3TPKV1kjDlVtZbl4Ksh"}'
- 401 Unauthorized: Invalid API key - check ~/.env
- 429 Too Many Requests: Rate limit exceeded - wait or upgrade plan
- Quota Exceeded: Monthly character limit reached - upgrade plan or wait for reset
voice-server/
βββ server.ts # Main server implementation
βββ voices.json # Voice metadata and configuration
βββ install.sh # Installation script
βββ start.sh # Start service
βββ stop.sh # Stop service
βββ restart.sh # Restart service
βββ status.sh # Check service status
βββ uninstall.sh # Uninstall service
βββ run-server.sh # Direct server runner
βββ logs/ # Server logs
β βββ voice-server.log
β βββ voice-server-error.log
βββ macos-service/ # LaunchAgent configuration
β βββ com.paivoice.server.plist
βββ menubar/ # Menu bar indicator scripts
βββ pai-voice.5s.sh
- API Key Protection: Keep your
ELEVENLABS_API_KEYsecure - Never commit API keys to version control
- CORS: Server is restricted to localhost only
- Rate Limiting: 10 requests per minute per IP
- Voice Generation: ~500ms-2s (API call + network)
- Audio Playback: Immediate after generation
- Monthly Quota: 10,000 characters (free tier)
- Rate Limits: Per ElevenLabs plan
Part of the Personal AI Infrastructure (PAI) system.
For issues or questions:
- Check the logs:
~/.claude/voice-server/logs/ - Verify configuration:
curl http://localhost:8888/health - Review documentation:
documentation/voice-system.md