synthesize_audio
Generate localized TTS audio in a target language using a selected voice and timed segments. Optionally mux a dubbed MP4 video with background music and original timing.
Instructions
Generate billed localized TTS (and optional dubbed video).
Args:
language: Target language name (e.g. "French").
language_code: Target language code (e.g. "fr").
voice_id: Voice id from list_voices.
segments: JSON array of {text, start_ms, end_ms, original?} objects.
output_path: Path to write the WAV audio.
keep_same_length: Stretch/compress speech to source timings.
keep_background_music: Mix transcribed music bed when stem_id is set.
stem_id: Optional bed stem from transcribe_audio.
source_duration_ms: Original duration.
source_transcript: Optional original transcript.
video_id: Optional id from transcribe/register to mux MP4.
video_output_path: Optional path for dubbed MP4 when video_id is set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stem_id | No | ||
| language | Yes | ||
| segments | Yes | ||
| video_id | No | ||
| voice_id | Yes | ||
| output_path | Yes | ||
| language_code | Yes | ||
| keep_same_length | No | ||
| source_transcript | No | ||
| video_output_path | No | ||
| source_duration_ms | No | ||
| keep_background_music | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |