Patter: Custom Voice

April 14, 2026 · View on GitHub

Patter

Patter: Custom Voice

Pipeline mode with independent STT and TTS providers -- use Deepgram for speech-to-text and ElevenLabs for text-to-speech, or mix and match any supported provider.

Part of the Patter Voice AI SDK.

Prerequisites

Quick Start

Python

cd python
cp ../.env.example .env   # fill in your keys
pip install -r requirements.txt
python main.py

TypeScript

cd typescript
cp ../.env.example .env   # fill in your keys
npm install
npx tsx main.ts

Environment Variables

VariableRequiredDescription
OPENAI_API_KEYYesOpenAI API key (used for the LLM)
TWILIO_ACCOUNT_SIDYesTwilio account SID
TWILIO_AUTH_TOKENYesTwilio auth token
TWILIO_PHONE_NUMBERYesYour Twilio phone number (E.164)
DEEPGRAM_API_KEYYesDeepgram API key for STT
ELEVENLABS_API_KEYYesElevenLabs API key for TTS
WEBHOOK_URLNoPublic URL for webhooks (auto-tunneled if omitted)

What This Demonstrates

  • provider="pipeline" for modular STT + LLM + TTS
  • Patter.deepgram() for configuring Deepgram speech-to-text
  • Patter.elevenlabs() for configuring ElevenLabs text-to-speech
  • Custom STT/TTS selection independent of the LLM provider

Next Steps

License

MIT