gianni-dalerta ca620b4a83 Complete roadmap: VAD, streaming, Docker, React component
New features:
- VAD integration in WebSocket flow (sends speech_detected status)
- Streaming response module (sentence-by-sentence TTS)
- Dockerfile with NVIDIA GPU support (CUDA 12.1)
- docker-compose.yml (GPU + CPU profiles)
- React component package (@openclaw/voice-widget-react)

Roadmap progress:
 VAD
 Streaming responses
 Docker GPU support
 React component
 API key auth
 Continuous mode

Remaining:
- WebRTC
- Vue component
- Kubernetes Helm
- RunPod template

Tests: 25 passing
2026-01-30 13:43:27 -05:00
2026-01-30 13:25:12 -05:00
2026-01-30 13:25:12 -05:00

OpenClaw Voice

Open-source browser-based voice interface for AI assistants.

Talk to your AI like you talk to Alexa — but self-hosted, private, and free from subscription fees.

License Python

Why?

Voice AI platforms like ElevenLabs Agents ($0.08-0.12/min) and Retell.ai ($0.13-0.31/min) are expensive. OpenClaw Voice runs entirely on your own hardware for ~$0.003/min at scale.

Features

  • 🎙️ Browser voice widget — Push-to-talk or hands-free continuous mode
  • 🚗 Continuous mode — Like Grok voice. Auto-listens after each response. Perfect for Tesla browser!
  • 🔊 Self-hosted STT — Whisper Large V3 Turbo (runs on Mac/Linux/GPU)
  • 🗣️ Self-hosted TTS — Chatterbox (MIT license, ElevenLabs quality)
  • 🔌 Pluggable backend — Connect to any AI (OpenAI, Claude, Clawdbot, etc.)
  • 🌐 WebRTC audio — Low latency (<500ms end-to-end achievable)
  • 🏠 Fully self-hosted — Your data stays on your servers

Quick Start

Prerequisites

  • Python 3.10+
  • Node.js 18+ (for client dev)
  • CUDA GPU recommended (CPU works but slower)

Installation

# Clone the repo
git clone https://github.com/Purple-Horizons/openclaw-voice.git
cd openclaw-voice

# Install Python dependencies
pip install -r requirements.txt

# Download models (first run only)
python scripts/download_models.py

# Start the voice server
python -m src.server.main

# Open http://localhost:8765 in your browser
docker compose up

Architecture

┌─────────────────┐     WebRTC      ┌─────────────────┐
│    Browser      │ ◄─────────────► │  Voice Gateway  │
│  (Voice Widget) │   Audio/Text    │    (Python)     │
└─────────────────┘                 └────────┬────────┘
                                             │
                    ┌────────────────────────┼────────────────────────┐
                    │                        │                        │
              ┌─────▼─────┐          ┌───────▼───────┐        ┌──────▼──────┐
              │  Whisper  │          │   Your AI     │        │ Chatterbox  │
              │   (STT)   │          │   Backend     │        │    (TTS)    │
              └───────────┘          └───────────────┘        └─────────────┘

Configuration

# config.yaml
stt:
  model: "whisper-large-v3-turbo"
  device: "cuda"  # or "cpu", "mps" (Mac)

tts:
  model: "chatterbox"
  voice: "default"  # or path to voice sample for cloning

backend:
  type: "openai"  # or "clawdbot", "custom"
  url: "https://api.openai.com/v1"
  model: "gpt-4o"

server:
  host: "0.0.0.0"
  port: 8765
  ssl: false  # Set true + provide certs for production

Supported Models

Speech-to-Text (STT)

Model Speed Quality VRAM
Whisper Large V3 Turbo 216x realtime Best ~6GB
Distil-Whisper 6x faster Good ~3GB
Whisper.cpp (CPU) Slower Best N/A

Text-to-Speech (TTS)

Model Speed Quality Voice Cloning
Chatterbox ~1s Excellent 5-second samples
Kokoro-82M <0.3s Very Good No
XTTS-v2 ~1s Excellent 6-second samples

Browser Widget

Embed the voice widget in any webpage:

<script src="https://unpkg.com/@openclaw/voice-widget"></script>
<openclaw-voice server="wss://your-server:8765"></openclaw-voice>

Or use React:

import { VoiceWidget } from '@openclaw/voice-widget-react';

<VoiceWidget serverUrl="wss://your-server:8765" />

API

WebSocket Protocol

Connect to ws://localhost:8765/ws and send/receive JSON messages:

// Start listening
{ "type": "start_listening" }

// Audio data (base64 PCM)
{ "type": "audio", "data": "base64..." }

// Stop listening
{ "type": "stop_listening" }

// Receive transcription
{ "type": "transcript", "text": "Hello world", "final": true }

// Receive AI response audio
{ "type": "audio_response", "data": "base64...", "text": "Hi there!" }

Roadmap

  • Basic WebSocket voice gateway
  • Whisper STT integration
  • Chatterbox TTS integration
  • Voice Activity Detection (VAD)
  • Streaming responses
  • Docker GPU support
  • React component (@openclaw/voice-widget-react)
  • API key authentication
  • Continuous conversation mode
  • WebRTC for lower latency
  • Voice cloning UI
  • Vue component
  • Kubernetes Helm chart
  • RunPod template

Hosted Service (Coming Soon)

Don't want to self-host? We offer a managed service:

Tier Minutes/Month Price Features
Free 60 $0 Basic voice chat
Pro 500 $29/mo + Voice cloning
Enterprise Unlimited $99/mo + Priority, SLA

API Key Authentication:

# Get an API key
curl -X POST "https://voice.openclaw.dev/api/keys?name=myapp&tier=pro" \
     -H "x-master-key: YOUR_MASTER_KEY"

# Connect with API key
wss://voice.openclaw.dev/ws?api_key=ocv_xxxxx

# Check usage
curl "https://voice.openclaw.dev/api/usage?api_key=ocv_xxxxx"

Cost Comparison

Platform Cost/Minute
ElevenLabs Conversational AI $0.08-0.12
Retell.ai $0.13-0.31
Vapi.ai $0.05-0.15
OpenClaw Voice (hosted) ~$0.06
OpenClaw Voice (self-hosted) ~$0.003

Contributing

Contributions welcome! See CONTRIBUTING.md.

License

MIT License — see LICENSE.

Credits


Made with 🦀 by Purple Horizons

Languages
Python 64.5%
HTML 26.2%
TypeScript 7.6%
Dockerfile 1.7%