Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
LMNTTTS
LMNT TTS provider: fast, expressive speech synthesis via the LMNT Speech API. Wraps LMNT’s/v1/ai/speech endpoint using the Blizzard 2.0 model
family. Supports 31 languages, accent control, word-level timestamps, and
streaming output. Voice IDs can be retrieved from the LMNT API’s voice
listing endpoint or the app.lmnt.com playground.
Constructor
LMNT API key. Falls back to the
LMNT_API_KEY environment variable when None.Voice ID to use for synthesis. LMNT provides a library of pre-built voices (e.g.
"ava") as well as cloned voices identified by their UUID. Browse available voices via the LMNT API voice listing endpoint or at app.lmnt.com. Defaults to "ava".TTS model identifier. Currently
"blizzard" is the production flagship (Blizzard 2.0); "aurora" is an alias that routes to Blizzard. Defaults to "blizzard".Desired output sample rate in Hz. Defaults to
24000 for all formats except mulaw, which defaults to 8000. Defaults to 24000.aclose
emit
The event to emit.
interrupt
off
The event the handler was registered for.
The handler to remove.
on
callback is omitted.
The event to listen for.
The handler to invoke when the event is emitted. If
None, a decorator is returned that registers the decorated function.The registered callback when
callback is provided, otherwise a decorator that registers and returns the function it wraps.on_first_audio_byte
A callable, optionally async, invoked with synthesis timing information when the first audio byte is emitted.
synthesize
The text to synthesize; coerced to a string if needed.