Skip to main content

MurfAITTS

Murf AI text-to-speech (TTS) provider.

Constructor

apiKey
string
Murf AI API key. Defaults to the MURFAI_API_KEY environment variable when not provided.
voice
string
Voice ID used for synthesis (e.g. a Murf voice such as en-US-natalie). Defaults to 'en-US-natalie'.
model
string
Murf AI synthesis model. Defaults to 'Falcon'.
sampleRate
number
Output audio sample rate in Hertz (Hz). Defaults to 24000.

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