Skip to main content

Documentation Index

Fetch the complete documentation index at: https://patter-06b046ce-feat-observability-otel-attrs-0-6-1.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

LMNT TTS

LMNTTTS calls LMNT’s /v1/ai/speech/bytes endpoint. The Patter port defaults to format: "raw" (PCM_S16LE) at 16 kHz for direct telephony use; callers can switch to mp3, mulaw, wav, aac when needed.

Install

npm install getpatter
No vendor SDK is required — LMNTTTS uses the platform fetch, so it works on Node 18+.

Usage

import { LMNTTTS } from "getpatter";

const tts = new LMNTTTS();                                            // reads LMNT_API_KEY
const tts2 = new LMNTTTS({ model: "blizzard", voice: "leah" });
In an agent:
// npx tsx example.ts
import { Patter, Twilio, DeepgramSTT, LMNTTTS } from "getpatter";

const phone = new Patter({ carrier: new Twilio(), phoneNumber: "+15550001234" });

const agent = phone.agent({
  stt: new DeepgramSTT(),                             // DEEPGRAM_API_KEY from env
  tts: new LMNTTTS({ model: "blizzard", voice: "leah" }),  // LMNT_API_KEY from env
  systemPrompt: "You are a helpful assistant.",
});

await phone.serve({ agent });

Options

OptionDefaultNotes
apiKeyReads from LMNT_API_KEY when omitted.
model"blizzard""blizzard" or "aurora".
voice"leah"LMNT voice id.
languageundefinedAuto-derived from model when omitted.
format"raw""aac", "mp3", "mulaw", "raw", "wav".
sampleRate160008000, 16000, or 24000.
temperature1.0Higher = more expressive.
topP0.8Controls stability.
baseUrlLMNT /v1/ai/speech/bytesOverride for proxying or self-hosted gateways.