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/lukeocodes/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 40 examples.
Foundation
first-voice-pipeline
secure-api-keys
Secure API keys with Express proxy — DeepgramSTT + AnthropicLLM + DeepgramTTS via server-side key injection
cloud-providers
Production-quality pipeline: Deepgram STT/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 DeepgramSTT language at runtime with a selector
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.
Privacy-sensitive? See 50-webllm-pipeline — everything runs in the browser, no data leaves the device.