Skip to main content

LMNTTTS

LMNT text-to-speech (TTS) provider.

Constructor

apiKey
string
LMNT API key. If omitted, falls back to the LMNT_API_KEY environment variable.
voice
string
default:"ava"
Voice to synthesize with. Accepts an LMNT voice id or name.
model
string
default:"blizzard"
LMNT model used for synthesis.
sampleRate
number
default:"24000"
Output audio sample rate in Hz.

close

Release any resources held by the provider.

closeEmitter

Close the emitter: drop all handlers and stop emitting. Waits up to 2 seconds for in-flight async handlers to settle before returning.

emit

event
string
required

getRuntimeConfig

returns
Record<string, any>

interrupt

Stop the current synthesis.

listenerCount

event
string
required
returns
number

off

event
string
required
handler
EventHandler
required

on

event
string
required
handler
EventHandler
required
returns
EventHandler

once

event
string
required
handler
EventHandler
required
returns
EventHandler

onFirstAudioByte

Register a callback fired when the first synthesized audio byte is emitted.
callback
FirstAudioByteCallback
required

removeAllListeners

event
string

synthesize

Synthesize and speak text on the active session.
text
any
required