Skip to main content

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:

  • Claude Code — installed on the same machine (claude CLI available in PATH)
  • OpenClaw — running with a gateway endpoint

More agent adapters coming soon. See Building an Adapter to connect your own agent.

Quick Start

Option A: Install from PyPI (recommended)

pip install tryvoice
tryvoice --setup    # Interactive wizard — configure adapter, TTS, etc.
tryvoice            # Start the server
# Open https://localhost:7860 in your browser

Option B: Install from source

git clone https://github.com/AaronZ021/tryvoice-oss.git
cd tryvoice
bash scripts/setup.sh   # Creates venv, installs packages, builds frontend
source .venv/bin/activate
tryvoice --setup         # Interactive configuration wizard
tryvoice                 # Start the server
# Open https://localhost:7860 in your browser

Configure your adapter

After running tryvoice --setup, or by editing .env manually:

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

Enable wake word (optional but recommended)

Once the UI loads, click the microphone settings icon and select a wake word keyword (e.g., "jarvis", "americano", "snowboy"). The browser will listen in the background — say the keyword to start a voice turn hands-free.

Docker

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    │   │──► Claude Code
│  Audio I/O   │                    │  │  Registry   │   │──► OpenClaw
│              │                    │  │  (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

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, or run tryvoice --setup for an interactive wizard.

Built-in Adapters

Adapter Use Case
claude-code Voice control for Claude Code terminal sessions
openclaw Voice interface to OpenClaw agent gateway
echo Testing and demo (echoes your speech back)

Building an Adapter

Connect TryVoice to any AI agent by implementing the Adapter protocol:

from backend.adapter_sdk import 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
tryvoice

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

tryvoice-0.1.2.tar.gz (61.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tryvoice-0.1.2-py3-none-any.whl (61.1 MB view details)

Uploaded Python 3

File details

Details for the file tryvoice-0.1.2.tar.gz.

File metadata

  • Download URL: tryvoice-0.1.2.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

Hashes for tryvoice-0.1.2.tar.gz
Algorithm Hash digest
SHA256 083ffdc9d2a456df4856a7d45b5077c4ea991f6b4d3dc53287498454d8be94ea
MD5 6e03ac043128375fde2559ead9ac7a51
BLAKE2b-256 224b0e73a11f0cd5fd22d4c56d4dfc0182879e06b6583c5af308a2dee30589d2

See more details on using hashes here.

File details

Details for the file tryvoice-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tryvoice-0.1.2-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

Hashes for tryvoice-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c57aaf9704cad7ed8a8a4562a3e5c72040d06e5c71f832237b1f23d24a80c09
MD5 6406b3502aa3b8c1326d76739a710db6
BLAKE2b-256 127b852b35eadee0c99f96526defd14537e69a96f010de69ede5094eeadcaf5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page