Examples
Runnable example apps covering every provider, pattern, and use case.
Every example is a standalone Vite app you can run locally. Clone the repository, install dependencies, and start any example:
git clone https://github.com/composite-voice/composite-voice.git
cd composite-voice
pnpm install
pnpm --filter 01-first-voice-pipeline devEach example runs on its own port so you can run several simultaneously. Found 49 examples.
Foundation
first-voice-pipeline
secure-api-keys
Secure API keys with Express proxy — SpeechmaticsSTT + AnthropicLLM + SpeechifyTTS via server-side key injection
cloud-providers
Production-quality pipeline: Speechmatics STT + Speechify TTS + Anthropic Claude via Vite proxy
base-provider-options
conversation-history
eager-pipeline
tool-use
custom-logging
Server & Deployment
native-stt
NativeSTT configuration explorer — Web Speech API + Anthropic Claude + NativeTTS
deepgram-stt
DeepgramSTT configuration explorer — Deepgram Nova + Anthropic Claude + NativeTTS
assemblyai-stt
AssemblyAISTT configuration explorer — AssemblyAI + Anthropic Claude + NativeTTS
elevenlabs-stt
ElevenLabsSTT configuration explorer — ElevenLabs Scribe + Anthropic Claude + NativeTTS
deepgram-flux
DeepgramFlux (V2 STT) demo — currently disabled, shows eager pipeline concept
Deepgram Pipelines
anthropic-llm
Anthropic LLM provider — NativeSTT + AnthropicLLM + NativeTTS with model/temperature/token controls
openai-llm
OpenAI LLM provider — NativeSTT + OpenAILLM + NativeTTS with model/temperature/token controls
groq-llm
Groq LLM provider — NativeSTT + GroqLLM + NativeTTS, ultra-fast inference
gemini-llm
Gemini LLM provider — NativeSTT + GeminiLLM + NativeTTS with model/temperature controls
mistral-llm
Mistral LLM provider — NativeSTT + MistralLLM + NativeTTS with model/temperature controls
webllm
WebLLM in-browser LLM — NativeSTT + WebLLMLLM + NativeTTS, no server needed
openai-compatible
OpenAI-compatible LLM — NativeSTT + OpenAICompatibleLLM + NativeTTS, custom endpoint
Provider Showcases
native-tts
Native TTS provider — NativeSTT + Anthropic Claude + NativeTTS with voice, rate, and pitch controls
deepgram-tts
Deepgram TTS provider — NativeSTT + Anthropic Claude + DeepgramTTS with voice, sampleRate, and format options
openai-tts
OpenAI TTS provider — NativeSTT + Anthropic Claude + OpenAI TTS with model, voice, format, and speed options
elevenlabs-tts
ElevenLabs TTS provider — NativeSTT + Anthropic Claude + ElevenLabs TTS with voiceId, modelId, stability, and similarityBoost
cartesia-tts
Cartesia TTS provider — NativeSTT + Anthropic Claude + Cartesia TTS with voiceId, modelId, emotions, speed, and language
express-proxy
Express proxy with full security config — rateLimit, maxBodySize, authenticate, CORS
nextjs-proxy
Next.js App Router proxy — createNextJsProxy with catch-all route and security config
node-proxy
Plain Node.js HTTP server proxy — createNodeProxy with handleRequest + attachWebSocket
microphone-input
Deep-dive into MicrophoneInput config — all AudioInputConfig options with real-time audio level meter
buffer-input
BufferInput for file/programmatic audio — upload a WAV file and feed it through the pipeline
browser-audio-output
Deep-dive into BrowserAudioOutput config — bufferSize, minBufferDuration, sampleRate, enableSmoothing
null-output
NullOutput for headless/testing scenarios — TTS events fire but no audio plays
event-inspector
Advanced event inspector — real-time timeline, payload display, filtering, wildcard subscriptions, queue events
conversation-strategies
Side-by-side comparison of conversation history strategies — maxTurns=3 vs maxTurns=10
error-recovery
RecoveryOrchestrator demo — configure recovery strategy, simulate errors, track recovery attempts
barge-in
Automatic barge-in demo — interrupt the agent mid-speech with stopSpeaking()
backpressure
Pipeline backpressure demo — adjust maxPendingChunks and observe LLM-to-TTS throttling
audio-config
AudioCapture internals — AudioWorklet vs ScriptProcessor detection, audio chunk stats
custom-provider
Build a custom LLM provider — MockLLM with canned responses, no API keys needed
multi-language
Language switching demo — change SpeechmaticsSTT language at runtime with a selector
guardrails
Guardrails demo — async filters between LLM output and TTS (PII redaction, pronunciation, blocklist, moderation)
Agent Providers
deepgram-agent
Deepgram Voice Agent API — single WebSocket handles STT, LLM, and TTS server-side
twilio-phone-agent
Phone agent on Twilio Media Streams — TwilioMediaStream + SpeechmaticsSTT + AnthropicLLM + DeepgramTTS, one pipeline per call
vonage-phone-agent
Phone agent on the Vonage Voice API WebSocket bridge — VonageAudioSocket + SpeechmaticsSTT + AnthropicLLM + DeepgramTTS, one pipeline per call
discord-voice-bot
Discord voice-channel bot — DiscordVoice duplex provider with Speechmatics STT, Deepgram TTS, and Claude
zoom-meeting-listener
Zoom RTMS meeting listener — live transcripts over a plain node:http webhook, with an end-of-meeting Claude summary
webrtc-loopback
WebRTCInput + WebRTCOutput over a local RTCPeerConnection loopback — join anything WebRTC with zero platform accounts
google-meet-listener
GoogleMeetInput (Developer Preview) — transcribe a live Google Meet conference and take LLM notes, receive-only
teams-meeting-agent
TeamsCall duplex — a voice agent that joins a Microsoft Teams meeting via Azure Communication Services, listens, and speaks replies
Where to start
New to the SDK? Start with 00-minimal-voice-agent — browser-native providers, one API key.
Building for production? Jump to 20-deepgram-pipeline for cloud-grade STT/TTS, then add 10-proxy-server for secure key management.
Simplest setup? Try 70-deepgram-agent — one provider handles STT, LLM, and TTS over a single WebSocket.
Privacy-sensitive? See 50-webllm-pipeline — everything runs in the browser, no data leaves the device.