Voice Mode (Phase I → v1.20)
Real-time STT/TTS pipeline in `@anvio/voice`.
1 min read
This is a migrated reference document from the original Anvio source repo. Content is preserved as-is; canonical documentation lives in the sections above in the sidebar.
Original path: docs/48-voice-mode.md
Real-time STT/TTS pipeline in @anvio/voice.
CLI
anvio voice speak Hello from Anvio
anvio voice transcribe recording.wav
anvio voice stream-transcribe recording.ogg # chunked Whisper
anvio voice realtime-transcribe recording.wav # OpenAI Realtime WebSocketWithout OPENAI_API_KEY, adapters return deterministic stubs for local testing.
Pipeline
VoicePipeline composes:
- STT — OpenAI Whisper API (
whisper-1) or Realtime WebSocket - TTS — OpenAI speech API (
tts-1)
const pipeline = new VoicePipeline();
const turn = await pipeline.turn('input.wav', async (text) => `You said: ${text}`);OpenAI Realtime STT (v1.20)
WebSocket transcription via wss://api.openai.com/v1/realtime?intent=transcription.
export OPENAI_API_KEY=sk-...
export ANVIO_VOICE_REALTIME=1 # auto-select realtime in stream-transcribe
export OPENAI_REALTIME_MODEL=gpt-4o-mini-transcribe # optional
anvio voice realtime-transcribe live.oggChannel voice notes (Telegram/Discord) can set ANVIO_VOICE_REALTIME=1 for lower-latency transcription.
Related
Last updated on
Remote Runtimes (Phase I / P13)
Extended `@anvio/runtimes` providers:
Workspace Artifacts — MD-first (Phase J)
Anvio aligns with [Hermes Agent](https://hermes-agent.nousresearch.com/docs) and [slaude](https://github.com/barockok/slaude) conventions: **human artifacts are Markdown**, not heavy Kubernetes-style