generate_subtitles
Transcribe video audio into .srt subtitles using local whisper.cpp or the OpenAI API, then return the generated subtitle file path.
Instructions
Generate subtitles for a video using whisper. Mode 'local' uses bundled or supplied whisper.cpp; mode 'api' uses OpenAI. Returns the path of the generated .srt file.
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": {
"video": "<video>"
},
"name": "generate_subtitles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Transcription mode (auto-detected from arguments if omitted) | |
| model | No | Path to whisper model (local mode; auto-detects bundled if omitted) | |
| video | Yes | Path to the video file | |
| api_key | No | OpenAI API key (api mode) | |
| whisper | No | Path to whisper-cli (local mode; auto-detects bundled if omitted) | |
| output_dir | No | Output directory for the .srt file |