Skip to main content

@latimer-woods-tech/telephony

Voice pipeline for inbound/outbound calls: Deepgram speech-to-text, ElevenLabs text-to-speech, Telnyx call control webhooks, and a VoiceSession orchestrator. Depends on @latimer-woods-tech/errors, @latimer-woods-tech/logger, and @latimer-woods-tech/llm.

Installation

Secrets required

API

transcribeAudio(audioBuffer, env, opts?)

Transcribes audio using Deepgram Nova-2.

synthesizeSpeech(text, env, opts?)

Synthesizes speech using ElevenLabs. Returns a Uint8Array of MP3 audio.

verifyTelnyxWebhook(request, secret)

Verifies a Telnyx webhook signature. Throws ValidationError on failure.

VoiceSession

Orchestrates a full conversation turn: transcribe → LLM → synthesize.

Example