Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
MurfAITTS
Streaming text-to-speech via Murf AI. Real-timeFalcon model and studio-grade Gen2 model, with 150+ voices
across 35+ languages.
Constructor
Murf API key. Falls back to
MURFAI_API_KEY.Murf
voiceId (e.g. "en-US-natalie") or the voice actor name (e.g. "natalie"). Default "en-US-natalie".Synthesis model:
"Falcon" (low-latency, real-time conversational) or "Gen2" (most realistic). Default "Falcon".Output rate in Hz. Default 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.