Pluggable voice chat runtime
Project description
TryVoice
Hands-free voice runtime for AI agents. Talk to your AI coding assistant without touching the keyboard.
TryVoice wraps AI agents (like OpenClaw and Claude Code) into a voice interface with wake word activation, push-to-talk, and real-time streaming — all running in your browser.
Early Preview (v0.1.0-alpha) — actively developed, expect rough edges.
What It Does
- Wake word activation — say a keyword to start talking, no hands needed (powered by OpenWakeWord)
- Push-to-talk — hold a button to speak, release to send
- Real-time streaming — hear the AI respond as it generates, with interruptible playback
- Multi-bot slots — up to 4 independent agent sessions side by side
- Mobile-ready — PWA support, works on phone browsers
- Pluggable adapters — connect any AI agent via the Adapter SDK
Prerequisites
TryVoice is a voice layer on top of existing AI agents. You need at least one of:
- OpenClaw — running with a gateway endpoint
- Claude Code — installed on the same machine (
claudeCLI available in PATH)
More agent adapters coming soon. See Building an Adapter to connect your own agent.
Quick Start
1. Clone and setup
git clone https://github.com/AaronZ021/tryvoice-oss.git
cd tryvoice
bash scripts/setup.sh
This creates a virtual environment, installs all packages, and builds the frontend.
2. Configure
# Edit .env (created from .env.example during setup)
vim .env
For Claude Code (voice-driven coding on your local machine):
TRYVOICE_ACTIVE_ADAPTER=claude-code
# That's it — TryVoice auto-discovers your Claude Code sessions
For OpenClaw (voice interface to OpenClaw agents):
TRYVOICE_ACTIVE_ADAPTER=openclaw
OPENCLAW_GATEWAY_URL=http://localhost:18789
OPENCLAW_GATEWAY_TOKEN=your_gateway_token_here
3. Run
source .venv/bin/activate
python -m backend.cli
# Open https://localhost:7860 in your browser
4. Enable wake word (optional but recommended)
Once the UI loads, click the microphone settings icon and select a wake word keyword (e.g., "hey jarvis", "alexa", "americano"). The browser will listen in the background — say the keyword to start a voice turn hands-free.
Docker
# Clone and configure
git clone https://github.com/AaronZ021/tryvoice-oss.git
cd tryvoice
cp .env.example .env
# Edit .env with your adapter settings (see above)
docker compose up
# Open https://localhost:7860
Architecture
┌─────────────┐ WebSocket ┌──────────────────┐
│ Browser UI │◄──────────────────►│ TryVoice │
│ (PWA) │ │ Runtime │
│ │ │ │
│ Wake Word │ │ ┌────────────┐ │
│ STT / TTS │ │ │ Adapter │ │──► OpenClaw
│ Audio I/O │ │ │ Registry │ │──► Claude Code
│ │ │ │ (plugin) │ │──► Your adapter
└─────────────┘ └──┴────────────┴───┘
Voice flow: Wake word / PTT → STT (browser Web Speech API or Groq Whisper) → Adapter → Agent → Streaming text → TTS (Edge TTS) → Audio playback
Voice Configuration
| Variable | Default | Description |
|---|---|---|
TRYVOICE_ACTIVE_ADAPTER |
echo |
Active adapter (claude-code, openclaw, or custom) |
GROQ_API_KEY |
— | Groq API key for server-side STT (optional, browser fallback) |
EDGE_TTS_VOICE |
zh-CN-XiaoxiaoNeural |
Edge TTS voice (300+ voices available) |
PORT |
7860 |
Server port |
See .env.example for all options.
Supported Adapters
| Adapter | Package | Use Case |
|---|---|---|
claude-code |
tryvoice-adapter-claude-code |
Voice control for Claude Code terminal sessions |
openclaw |
tryvoice-adapter-openclaw |
Voice interface to OpenClaw agent gateway |
echo |
Built-in | Testing and demo (echoes your speech back) |
Building an Adapter
Connect TryVoice to any AI agent by implementing the Adapter protocol:
pip install tryvoice-adapter-sdk
from tryvoice_adapter_sdk import AgentAdapter, AdapterCapabilities, AdapterEvent
class MyAdapter:
def report_capabilities(self) -> AdapterCapabilities:
return AdapterCapabilities(supports_stream=True, ...)
async def stream_user_turn(self, session_key, text, ...):
# Call your agent, yield AdapterEvent chunks
yield AdapterEvent(kind="token", text="Hello!")
yield AdapterEvent(kind="turn_end")
Register via entry point in pyproject.toml:
[project.entry-points."tryvoice.adapters"]
my-agent = "my_package.adapter:MyAdapter"
Development
Prerequisites
- Python 3.9+ (3.11 recommended)
- Node.js 20+ (for frontend build)
Setup
git clone https://github.com/AaronZ021/tryvoice-oss.git
cd tryvoice
bash scripts/setup.sh
source .venv/bin/activate
python -m backend.cli
Project structure
tryvoice/
├── apps/
│ ├── host-runtime/ # Python FastAPI backend (adapter layer, session FSM, voice providers)
│ └── client-web/ # TypeScript frontend (Vite, state machine, wake word, audio)
├── scripts/ # Setup and build scripts
├── pyproject.toml # Python package config
├── Dockerfile # Multi-stage build (Node + Python)
└── docker-compose.yml # Single-command deployment
License
Apache License 2.0 — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tryvoice-0.1.1.tar.gz.
File metadata
- Download URL: tryvoice-0.1.1.tar.gz
- Upload date:
- Size: 61.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae148dc5cec42069c229163773aa88e8a1ea6d5e7745a22365292940b7b6b042
|
|
| MD5 |
a1ec6365b798474b72a7d071b59c6499
|
|
| BLAKE2b-256 |
bd755556b6bec1be98a08f48b52b7b1934be33eff6055d576c5d23fd075e9ec0
|
File details
Details for the file tryvoice-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tryvoice-0.1.1-py3-none-any.whl
- Upload date:
- Size: 61.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5d0ceaa028fa122e356c0196babc106f2515d5ce005d759d5d8d8a57cf7288d
|
|
| MD5 |
2cc5a4e267413a6d3f565b25891ff9c8
|
|
| BLAKE2b-256 |
870d3803ec71628cdd725cf953f9a8092548c23ee1422021e011b8b2195ee058
|