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

pip install "getpatter[lmnt]"

Usage

# Namespaced import
from getpatter.tts import lmnt

tts = lmnt.TTS()                                          # reads LMNT_API_KEY
tts = lmnt.TTS(model="blizzard", voice="leah")

# Flat alias (equivalent)
from getpatter import LMNTTTS

tts = LMNTTTS(model="blizzard", voice="leah")
In an agent:
import asyncio
from getpatter import Patter, Twilio, DeepgramSTT, LMNTTTS

phone = Patter(carrier=Twilio(), phone_number="+15550001234")

agent = phone.agent(
    stt=DeepgramSTT(),                                    # DEEPGRAM_API_KEY from env
    tts=LMNTTTS(model="blizzard", voice="leah"),          # LMNT_API_KEY from env
    system_prompt="You are a helpful assistant.",
)

asyncio.run(phone.serve(agent))

Low-level usage

from getpatter.providers.lmnt_tts import LMNTTTS as _LowLevelTTS

tts = _LowLevelTTS(
    api_key="...",          # or LMNT_API_KEY env var
    model="blizzard",
    voice="leah",
    # language=None -> defaults to "auto" for blizzard, "en" for aurora
    format="raw",
    sample_rate=16000,
    temperature=1.0,
    top_p=0.8,
)

async for chunk in tts.synthesize("Hello from Patter."):
    ...

await tts.close()

Options

OptionDefaultNotes
api_keyNoneReads from LMNT_API_KEY when omitted.
model"blizzard""blizzard" or "aurora".
voice"leah"LMNT voice id.
languageNoneAuto-derived from model when omitted.
format"raw""aac", "mp3", "mulaw", "raw", "wav".
sample_rate160008000, 16000, or 24000.
temperature1.0Higher = more expressive.
top_p0.8Controls stability.