Skip to main content

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 "patter[lmnt]"

Usage

from patter.providers.lmnt_tts import LMNTTTS

tts = LMNTTTS(
    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
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.

Attribution

Ported from LiveKit Agents (livekit-plugins-lmnt, Apache License 2.0).