Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
Version History
- Default batch size for translation reduced from 250 to 50 sentences (configurable). - Added script: scripts/validate_srt.py for validating SRT file format. - Updated documentation with security considerations and best practices for storing API keys. - Expanded configuration options: now supports environment variables and command line arguments (recommended over config files). - Improved documentation for quick start, validation usage, and workflow steps.
What This Skill Does
Translates SRT subtitle files from one language to another using any OpenAI-compatible LLM API. Preserves all timestamps exactly. Outputs either a single translated language or bilingual format with the translation displayed above the original text.
Unlike pasting subtitle text into a general translation tool, this processes SRT files directly in batches and reconstructs the file with original timecodes intact, skipping manual reformatting entirely.
When to use it
- Translating foreign film subtitles for personal viewing
- Creating bilingual subtitles for language learning
- Localizing YouTube video captions for international audiences
- Adding translated subtitles to conference or lecture recordings
- Preparing multilingual subtitles for video course distribution
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: translate video.srt from English to Chinese with bilingual output
- 1Parse the SRT file to extract subtitle indexes, timecodes, and text
- 2Validate the input file format
- 3Send text in batches of 50 sentences to the configured OpenAI-compatible API
- 4Verify that the returned sentence count matches the input
- 5Reconstruct the SRT file combining original timecodes with translated text
video_bilingual.srt with Chinese translation on the line above each original English subtitle, all timestamps preserved
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.