Translate subtitles with a local LLM
translate_subtitlesTranslate finished subtitle files into another language using a local LLM while preserving timing and leaving originals unchanged.
Instructions
Translate finished subtitles into another language with the LLM running on the user's own computer (Ollama, LM Studio, llama-server, ...). Timing is kept; the original file is not changed.
path: absolute path to the .json written by transcribe (best), or an .srt / .vtt. target: language code or name: th, ja, es, de, "Thai", ... formats: comma list from srt, vtt, txt, json, ass for the translated files (NAME..srt, ...). llm_url: OpenAI-compatible endpoint, e.g. http://127.0.0.1:11434/v1; empty = the usual local ports. model: model name to ask for; empty = the first one the endpoint lists. Returns the files written, the number of subtitles, the language code, and the model used. If no local LLM is running, the error says how to start one; you can also translate the text yourself instead.
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": {
"path": "<path>",
"target": "<target>"
},
"name": "translate_subtitles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| model | No | ||
| target | Yes | ||
| formats | No | srt | |
| llm_url | No |