Text to Speech

Generate speech audio from a prompt when a trigger or event occurs and save locally or play via SIP.

Overview

Generate speech audio from a prompt when a trigger or event occurs and save locally or play via SIP.

Text to Speech

This node generates an audio file from a text prompt when a trigger or event occurs. The audio is saved locally on the filesystem, and the node outputs metadata indicating whether a new audio file was generated.

Inputs & Outputs

  • Input media: Raw Video.
  • Output media: Raw Video.
  • Output metadata: nodes.node_id.audio_generated_delta.

Properties

PropertyDescriptionTypeDefaultRequired
trigger_sourceGenerate audio from events generated by other nodes or a custom defined trigger. Options: Events from previous nodes (built_in); Custom Trigger (custom).enumcustomYes
triggerGenerate audio when this condition evaluates to true. Conditional on trigger_source being custom.trigger-conditionnullYes
intervalMin. time between consecutive generations. Unit: seconds.float10No
enabledEnabledbooltrueNo
prompt_sourcePrompt Source. Options: Static prompt (static); Metadata path (metadata_path).enumstaticYes
prompt_textStatic Prompt. Conditional on prompt_source being static.string""No
prompt_metadata_pathComma-separated metadata paths to extract prompt text. Conditional on prompt_source being metadata_path. Format: comma-separated metadata paths or patterns.string""No
tts_providerTTS Provider. Options: Lumeo Cloud (lumeo); ElevenLabs Cloud (elevenlabs).enumlumeoYes
lumeo_voice_idVoice. Options: Male (male); Female (female). Conditional on tts_provider being lumeo.enummaleYes
elevenlabs_api_keyElevenLabs API Key. Conditional on tts_provider being elevenlabs.stringnullYes
elevenlabs_voice_idElevenLabs Voice ID. Conditional on tts_provider being elevenlabs.stringDXFkLCBUTmvXpp2QwZjAYes
elevenlabs_model_idElevenLabs Model ID. Conditional on tts_provider being elevenlabs.stringeleven_flash_v2_5No
audio_formatAudio Format. Options: MP3 (mp3); WAV (wav).enummp3No
sip_enabledWhen enabled, plays the generated audio to a SIP endpoint (e.g. a Hanwha speaker) via RTP. Audio format is forced to WAV when SIP is enabled.boolfalseYes
sip_ipSIP Endpoint IP. Conditional on sip_enabled being true.string""Yes
sip_portSIP Port. Conditional on sip_enabled being true.number5060Yes
sip_usernameSIP user/extension on the endpoint. Conditional on sip_enabled being true.string51Yes
sip_passwordSIP password (optional, for future digest auth support). Conditional on sip_enabled being true.string""No

When SIP output is enabled, audio format is automatically forced to WAV. The node establishes a SIP call to the endpoint, streams the audio as G.711 u-law over RTP, then terminates the call.

Output Metadata

The fields below are declared by this node's metadata schema; the JSON values are representative examples.

PathTypeDescription
nodes.<node_id>.audio_generated_deltabooleanWhen audio is generated
nodes.<node_id>.audio_filepathstringThe filepath of the audio file generated, present when audio is generated
nodes.<node_id>.typestringIdentifies the node type that produced this metadata.

JSON example

{
  "nodes": {
    "text_to_speech1": {
      "audio_filepath": "/path/to/output",
      "audio_generated_delta": false,
      "type": "text_to_speech"
    }
  }
}

Did this page help you?