Translate subtitles
translate_subtitlesTranslates SRT or VTT subtitle files between Tunisian Derja and English, French, or Modern Standard Arabic while preserving timings and speaker labels; batches lines to control cost.
Instructions
Translate an SRT or VTT file between Tunisian Derja and English, French, or MSA, keeping every timing and speaker label. Lines are sent in batches to keep cost low. Pair with create_voiceover (srt_path) to dub a video. Reports progress per batch. Costs money per character.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_path": "<input_path>",
"target": "<target>"
},
"name": "translate_subtitles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | same | |
| source | No | Source language. Usually auto-detected. | |
| target | Yes | Target language, e.g. "French", "English", "Derja", "MSA" (see list_translation_languages). | |
| input_path | Yes | SRT/VTT file, e.g. from transcribe_video, or a tapra://output/... resource. | |
| output_path | No | Where to save. Default: <name>.<target>.srt in the output folder. | |
| max_cost_tnd | No | Refuse to run if the estimated cost is above this many TND. Defaults to TAPRA_MAX_COST_TND when set. |