sophie-voice-bridge
⭐ 1 stars
🔗 Quick Links
📊 Project Details
- Primary Language: Python
- Languages Used: Python, Dockerfile
- License: None
- Created: January 28, 2026
- Last Updated: April 30, 2026
📝 About
Sophie Voice Bridge
ElevenLabs Custom LLM server that connects to Sophie AI via Clawdbot.
Architecture
WhatsApp Call → ElevenLabs (STT/TTS) → Haiku (fast) ─┬─→ Direct response
│
└─→ ask_sophie → Sophie/Opus
(full capabilities)
- Haiku handles fast voice responses (1-3 sentences)
- ask_sophie tool escalates complex questions to Sophie (Opus with tools)
- Sophie has access to calendar, email, web search, files, memory, etc.
Quick Start (Docker)
# Clone
git clone https://github.com/aaron777collins/sophie-voice-bridge.git
cd sophie-voice-bridge
# Configure
cp .env.example .env
# Edit .env with your Clawdbot gateway token
# Run
docker compose up -d
# Check health
curl http://localhost:8013/health
Configuration
Create .env file:
API Endpoints
Both routes work (ElevenLabs uses /chat/completions):
POST /v1/chat/completions # OpenAI standard
POST /chat/completions # ElevenLabs format
GET /health # Health check
🎙️ ElevenLabs Setup Guide
Step 1: Create an Agent
- Go to ElevenLabs Agents Platform
- Click "Create Agent"
- Give it a name (e.g., "Sophie Voice")
Step 2: Configure LLM (Custom)
- In Agent settings, go to "LLM" section
- Select "Custom LLM"
- Configure:
- Server URL:
https://voice.aaroncollins.info - Model:
haiku(or anything - it's ignored) - Custom LLM extra body: ✅ Enable this
- Limit token usage:
5000(recommended)
Step 3: Configure Voice
- Go to "Voice" section
- Choose a voice you like (the voice Sophie will speak with)
- Adjust stability/clarity as needed
Step 4: Connect WhatsApp (via Twilio)
- Go to "Phone Numbers" section
- Click "Import Phone Number"
- Enter your Twilio credentials:
- Phone Number: Your Twilio number with WhatsApp enabled
- Twilio SID: From Twilio console
- Twilio Token: From Twilio console
- Assign the agent to the phone number
Step 5: Test
Outbound call (you call someone): 1. In Phone Numbers, click the outbound call button 2. Select your agent 3. Enter the phone number to call 4. Click "Send Test Call"
Inbound call (someone calls you): - Call your Twilio number on WhatsApp - The agent will answer automatically
How It Works
- You speak on WhatsApp call
- ElevenLabs STT transcribes your speech to text
- Text sent to
/chat/completionsendpoint - Haiku evaluates:
- Simple question → responds directly (fast, 1-3 sentences)
- Complex question → uses
ask_sophietool - If ask_sophie used:
- Sophie (Opus) processes with full tool access
- Can check calendar, email, search web, access files
- Haiku relays response conversationally
- ElevenLabs TTS converts response to speech
- You hear Sophie's voice response
When ask_sophie is Used
Haiku automatically escalates to Sophie when you ask about: - Calendar, schedule, events, appointments - Emails, messages, notifications - Files, documents, code, projects - Research requiring web search or browsing - Complex technical or business questions - Anything requiring memory of past conversations
Simple greetings, math, and general knowledge are handled by Haiku directly.
Development
# Local setup
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Run locally
python bridge.py
Test Commands
# Health check
curl https://voice.aaroncollins.info/health
# Simple question (Haiku direct)
curl -X POST https://voice.aaroncollins.info/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "What is 2+2?"}], "stream": false}'
# Complex question (triggers ask_sophie)
curl -X POST https://voice.aaroncollins.info/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "What meetings do I have tomorrow?"}], "stream": false}'
License
MIT