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
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
trigger_source | Generate audio from events generated by other nodes or a custom defined trigger. Options: Events from previous nodes (built_in); Custom Trigger (custom). | enum | custom | Yes |
trigger | Generate audio when this condition evaluates to true. Conditional on trigger_source being custom. | trigger-condition | null | Yes |
interval | Min. time between consecutive generations. Unit: seconds. | float | 10 | No |
enabled | Enabled | bool | true | No |
prompt_source | Prompt Source. Options: Static prompt (static); Metadata path (metadata_path). | enum | static | Yes |
prompt_text | Static Prompt. Conditional on prompt_source being static. | string | "" | No |
prompt_metadata_path | Comma-separated metadata paths to extract prompt text. Conditional on prompt_source being metadata_path. Format: comma-separated metadata paths or patterns. | string | "" | No |
tts_provider | TTS Provider. Options: Lumeo Cloud (lumeo); ElevenLabs Cloud (elevenlabs); Local (local). | enum | lumeo | Yes |
lumeo_voice_id | Voice. Options: Male (male); Female (female). Conditional on tts_provider being lumeo. | enum | male | Yes |
local_voice_id | Runs on the gateway's CPU with no cloud calls. English only; audio is always WAV. Options: Male (male); Male (assertive) (male_assertive); Female (female). Conditional on tts_provider being local. | enum | male | Yes |
local_speed | Speed. Options: Slower (slower); Slow (slow); Normal (normal); Fast (fast). Conditional on tts_provider being local. | enum | normal | No |
local_variability | How much the delivery varies. Up to 0.3 a prompt always sounds the same and repeats are replayed from cache; above 0.3 every playback is generated fresh and sounds a little different. Conditional on tts_provider being local. Range: minimum 0, maximum 1.4. Step: 0.1. | float | 0.3 | No |
elevenlabs_api_key | ElevenLabs API Key. Conditional on tts_provider being elevenlabs. | string | null | Yes |
elevenlabs_voice_id | ElevenLabs Voice ID. Conditional on tts_provider being elevenlabs. | string | DXFkLCBUTmvXpp2QwZjA | Yes |
elevenlabs_model_id | ElevenLabs Model ID. Conditional on tts_provider being elevenlabs. | string | eleven_flash_v2_5 | No |
audio_format | Audio Format. Options: MP3 (mp3); WAV (wav). | enum | mp3 | No |
sip_enabled | When 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. | bool | false | Yes |
sip_ip | SIP Endpoint IP. Conditional on sip_enabled being true. | string | "" | Yes |
sip_port | Leave blank to use the transport's standard port: 5060 for UDP and TCP, 5061 for TLS. Clear a saved 5060 when switching to TLS. Conditional on sip_enabled being true. | number | null | No |
sip_transport | Transport for SIP signaling. TLS encrypts signaling and accepts the endpoint's self-signed certificate. Audio (RTP) is always sent over UDP. Options: UDP (udp); TCP (tcp); TLS (SIPS) (tls). Conditional on sip_enabled being true. | enum | udp | No |
sip_volume | Level applied to the audio before it is played to the SIP endpoint. Options: Loud (normalized + soft limiter) (loud); Normalized (peak at -2 dBFS) (normalized); Original (original). Conditional on sip_enabled being true. | enum | loud | No |
sip_media_encryption | Encrypts the audio with SRTP (AES_CM_128_HMAC_SHA1_80). The call fails if the endpoint won't use SRTP. Options: SRTP (srtp); None (none). Conditional on sip_transport being tls. | enum | srtp | No |
sip_username | SIP user/extension on the endpoint (optional). Leave blank to call the endpoint by IP only. When set, it is sent in the To header first and the call is retried without it if the endpoint answers 403. Conditional on sip_enabled being true. | string | "" | No |
sip_password | SIP password (optional). Used with the SIP Username to answer 401/407 digest auth challenges. 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. Packets are paced evenly in real time, and the call is held briefly so the endpoint finishes playing before hang-up.
The Local provider generates speech on the gateway's CPU with no cloud calls, in English with a male or female voice. Output is always WAV (24 kHz), or 8 kHz PCM when playing over SIP.
Generated audio is cached per prompt text, for static and metadata-driven prompts alike. When a prompt repeats, the cached file is replayed instead of calling the TTS provider again. Up to 100 files are kept; the least recently used is deleted first.
Output Metadata
The fields below are declared by this node's metadata schema; the JSON values are representative examples.
| Path | Type | Description |
|---|---|---|
nodes.<node_id>.audio_generated_delta | boolean | When audio is generated |
nodes.<node_id>.audio_filepath | string | The filepath of the audio file generated, present when audio is generated |
nodes.<node_id>.type | string | Identifies 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"
}
}
}Updated 18 days ago
