ChatGPT Subtitle Translator CLI
ChatGPT Subtitle Translator is a CLI for long SRT files, retaining earlier dialogue context and resuming interrupted work.
- 391 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The translator reads subtitles and sends dialogue to the chosen API when using a network provider.
- The CLI writes translation and progress files, and requests consume account quota.
Install
Manual install
git clone https://github.com/Cerlancism/chatgpt-subtitle-translatorFirst README Setup step. Continue with `npm install`, CLI permissions and `.env`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The translator reads subtitles and sends dialogue to the chosen API when using a network provider.
- The CLI writes translation and progress files, and requests consume account quota.
This is third-party code. Review the repository files before installing.
What it does
ChatGPT Subtitle Translator is a CLI for translating SRT subtitles and plain text through an OpenAI-compatible API. It separates dialogue from SRT numbering and timestamps, batches lines and requests structured output. Ordinary modes compare input and output line counts and retry mismatches. In agent mode, the model first summarizes the file and plans translation by sections. The translation then uses that context for names and dialogue tone. A local provider such as Ollama can be used through its compatible API.
Who it is for. Video editors translating long SRT files while retaining dialogue alignment and resuming interrupted work.
Good fit when
- A translator processes long dialogue with context from previous batches.
- An editor resumes an interrupted translation in `array` mode using the saved progress file.
- A film repeats names and terms, so the editor starts with overview and planning passes.
- An editor switches translation to a local Ollama endpoint with a compatible API.
Not a fit when
- An editor needs speech transcription and has no subtitle text yet.
- An editor selects `timestamp` mode but expects progress-file resumption.
- The model provider does not support the selected structured response format.
Example request
Translate this SRT into Russian in array mode, save a separate output file and keep subtitle entries separate.Limitations
The CLI requires Node.js 20 or later; users install dependencies and configure the selected provider’s key in `.env`. Structured response support depends on the model API. In `timestamp` mode, adjacent subtitle entries may merge, and progress-file resumption is unsupported. Retries after line-count mismatches and the extra planning passes in agent mode increase the number of model requests compared with a successful single translation pass.
How to disable. Stop the translator process and remove it from jobs. Retain output SRT and progress files, then remove the key from `.env` or revoke it with the provider.
FAQ
How do I choose between array and timestamp?
The default `array` mode retains input-to-output entry alignment. `timestamp` may merge adjacent entries and cannot resume from a progress file. Choose `array` when separate entries and recovery after interruption matter.
What changes in agent mode?
In `agent` mode, the model first summarizes characters, names and tone, then plans the translation. This adds API requests; choose it for dialogue with names and expressions recurring throughout the file.
Can I use another API provider?
Yes. Set `OPENAI_BASE_URL` in `.env` to the provider’s OpenAI-compatible `/v1` endpoint and use its key. The README names Ollama for local operation; select a supported model next.
How do I select input and output files?
`--input` and `--output` select the files, while `--to` sets the target language. CLI `array` mode keeps entry alignment; choose a new output name to retain the source.
What happens when line counts differ?
Ordinary modes retry with smaller batches down to a single entry. `timestamp` instead compares time-span boundaries and permits adjacent entries to merge.
Discussion
No questions or reviews yet.
Related
CLI toolsGemini SRT Translator, CLI на Python, переводит субтитры SRT и ASS через Gemini с таймкодами и ставит скилл для агентов.
VideoCaptioner transcribes speech, translates subtitles and burns them into video with a single command from Claude Code.
The skill turns a video or podcast link or file into a transcript and summary using platform subtitles and Whisper.
A skill that transcribes video, lets you review captions in a browser and burns in Chinese and English captions.
A Codex and Claude Code skill: subtitles and a summary from a Douyin, Xiaohongshu, Bilibili or YouTube link or a local file
A CLI and coding-agent skills assemble rough cuts from your footage and save editable projects for further review
README in short
With an explicit `--output`, the progress file is named `<file>.progress.csv` in modes that support resumption. `--guard-repetition` sets how many repeated patterns trigger a stream abort and a retry.