generate_subtitles
Generate SRT or WebVTT subtitle files from audio or video using local whisper.cpp transcription. Supports auto language detection, English translation, and GPU acceleration.
Instructions
Generate subtitle files for an audio or video file using whisper.cpp. Set language='auto' to detect the spoken language automatically. Set translate_to_english=true to also generate an English translation subtitle file. Supports SRT and WebVTT (VTT) output formats. When both native and translation are requested, two files are saved: one in the original language and one English translation. Load SRT in VLC via Subtitle → Add Subtitle File. VTT works in web players and HTML5 video. Supports all standard formats plus .3gp and .ts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | Prior context string for domain-specific vocabulary or speaker names. | |
| best_of | No | Candidate sequences evaluated. Default 5. | |
| diarize | No | Stereo speaker diarization. Requires stereo audio. | |
| threads | No | CPU threads. Defaults to 4 of 8. | |
| language | No | Language code (e.g. ja, es, fr, de) or 'auto' to detect automatically. Defaults to en. | en |
| beam_size | No | Beam search width. Higher = more accurate, slower. Default 5. | |
| file_path | Yes | Absolute Windows path to the file. | |
| vad_model | No | Path to Silero VAD model .bin. Strips silence before transcription. | |
| background | No | Run as a detached background job — recommended for files over 10 minutes. Returns a job ID to use with check_progress. translate_to_english is not available in background mode. | |
| gpu_device | No | GPU/Vulkan device index for multi-GPU systems. Overrides the WHISPER_GPU_DEVICE env default. Check whisper-cli's startup log for the index that lists your target card. | |
| temperature | No | Sampling temperature 0.0–1.0. Default 0.0. | |
| tinydiarize | No | Mono speaker-turn detection (TinyDiarize). Requires a tdrz model (small.en-tdrz) activated via switch_model. | |
| output_format | No | srt = SubRip subtitle (default, widest compatibility), vtt = WebVTT (web and HTML5 video). | srt |
| translate_to_english | No | Also generate an English translation subtitle file alongside the native language file. Only applies when language is not 'en'. Not available in background mode. |