Skip to content

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 dev

Each example runs on its own port so you can run several simultaneously. Found 40 examples.

Foundation

Server & Deployment

Deepgram Pipelines

Provider Showcases

30

native-tts

Native TTS provider — NativeSTT + Anthropic Claude + NativeTTS with voice, rate, and pitch controls

31

deepgram-tts

Deepgram TTS provider — NativeSTT + Anthropic Claude + DeepgramTTS with voice, sampleRate, and format options

32

openai-tts

OpenAI TTS provider — NativeSTT + Anthropic Claude + OpenAI TTS with model, voice, format, and speed options

33

elevenlabs-tts

ElevenLabs TTS provider — NativeSTT + Anthropic Claude + ElevenLabs TTS with voiceId, modelId, stability, and similarityBoost

34

cartesia-tts

Cartesia TTS provider — NativeSTT + Anthropic Claude + Cartesia TTS with voiceId, modelId, emotions, speed, and language

40

express-proxy

Express proxy with full security config — rateLimit, maxBodySize, authenticate, CORS

41

nextjs-proxy

Next.js App Router proxy — createNextJsProxy with catch-all route and security config

42

node-proxy

Plain Node.js HTTP server proxy — createNodeProxy with handleRequest + attachWebSocket

50

microphone-input

Deep-dive into MicrophoneInput config — all AudioInputConfig options with real-time audio level meter

51

buffer-input

BufferInput for file/programmatic audio — upload a WAV file and feed it through the pipeline

52

browser-audio-output

Deep-dive into BrowserAudioOutput config — bufferSize, minBufferDuration, sampleRate, enableSmoothing

53

null-output

NullOutput for headless/testing scenarios — TTS events fire but no audio plays

54

event-inspector

Advanced event inspector — real-time timeline, payload display, filtering, wildcard subscriptions, queue events

55

conversation-strategies

Side-by-side comparison of conversation history strategies — maxTurns=3 vs maxTurns=10

60

error-recovery

RecoveryOrchestrator demo — configure recovery strategy, simulate errors, track recovery attempts

61

barge-in

Automatic barge-in demo — interrupt the agent mid-speech with stopSpeaking()

62

backpressure

Pipeline backpressure demo — adjust maxPendingChunks and observe LLM-to-TTS throttling

63

audio-config

AudioCapture internals — AudioWorklet vs ScriptProcessor detection, audio chunk stats

64

custom-provider

Build a custom LLM provider — MockLLM with canned responses, no API keys needed

65

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.

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency