Desktop app that translates subtitle files (SRT, VTT, ASS, SSA) into other languages using ChatGPT-style LLMs.
Cerlancism/chatgpt-subtitle-translator
A CLI and web tool that translates SRT subtitle files line by line using ChatGPT or any OpenAI-compatible API, including local Ollama models.
- Stars
- 391
- Forks
- 43
- Open issues
- 4
- Last commit
- 6 days ago
What is it?
This tool translates subtitle files and plain text with large language models through the OpenAI chat completions API or any OpenAI-compatible provider, such as a local Ollama server. It is built around line-based translation: SRT indices and timestamps are stripped before sending, and lines are grouped into batches, which reduces token usage and keeps the output line count matched to the input so subtitle timing stays intact.
Both a web interface and a command line interface are available. The CLI supports resuming interrupted jobs through a progress file, a moderation pre-check, rate limiting by requests per minute, and several structured output modes (array, object, timestamp, and none). An optional agent mode runs planning passes over the file to build a context summary before translating.
The project is written in JavaScript and runs on Node.js 20 or newer.
Key features
- 01Web UI and command line interface for translating SRT subtitles and plain text
- 02Line-based batching that strips SRT overhead to reduce token usage
- 03Works with any OpenAI-compatible provider, including local Ollama models
- 04Structured output modes that keep translated lines matched to the input
- 05Progress resumption and streaming output in the CLI
- 06Optional agent mode that plans across the whole file before translating
Use cases
- Translating movie or TV subtitle files into another language
- Localizing SRT captions for video content without re-timing them
- Running subtitle translation fully offline with a local Ollama model
- Translating plain text line by line while preserving line order
Quick start
- 1
Clone the repository
git clone https://github.com/Cerlancism/chatgpt-subtitle-translator - 2
Navigate into the directory
cd chatgpt-subtitle-translator - 3
Install the requirements
npm install - 4
Copy .env.example to .env and add your API key
cp .env.example .env
Things to know
- Requires Node.js 20 or newer and a bash-style shell as assumed by the README.
- Translation quality and cost depend on the chosen model; OpenAI API keys are needed unless using a local compatible provider like Ollama.
In collections
Topics
FAQ
- What is chatgpt-subtitle-translator?
- A CLI and web tool that translates SRT subtitle files line by line using ChatGPT or any OpenAI-compatible API, including local Ollama models. This tool translates subtitle files and plain text with large language models through the OpenAI chat completions API or any OpenAI-compatible provider, such as a local Ollama server. It is built around line-based translation: SRT indices and timestamps are stripped before sending, and lines are grouped into batches, which reduces token usage and keeps the output line count matched to the input so subtitle timing stays intact.
- Is chatgpt-subtitle-translator free to use? What license does it have?
- chatgpt-subtitle-translator is open source under the MIT license. Check the license terms before using it in commercial products.
- Is chatgpt-subtitle-translator still maintained?
- Actively maintained. The last commit to chatgpt-subtitle-translator was on Nov 1, 2026.
- What can I use chatgpt-subtitle-translator for?
- Translating movie or TV subtitle files into another language Localizing SRT captions for video content without re-timing them Running subtitle translation fully offline with a local Ollama model Translating plain text line by line while preserving line order
- How do I install chatgpt-subtitle-translator?
- Clone the repository: git clone https://github.com/Cerlancism/chatgpt-subtitle-translator Navigate into the directory: cd chatgpt-subtitle-translator Install the requirements: npm install Copy .env.example to .env and add your API key: cp .env.example .env
- Where can I get chatgpt-subtitle-translator?
- The source code and installation instructions are on GitHub: https://github.com/Cerlancism/chatgpt-subtitle-translator
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An LLM-powered desktop and CLI tool for video subtitles: speech recognition, sentence segmentation, correction, translation and burning subtitles into video.
A JetBrains IDE plugin that generates git commit messages from your diff using a configurable LLM backend.
A PWA translator that uses OpenAI-compatible chat models, installable on phone or desktop, with local translation history.
An open-source Go framework that organizes reusable AI prompts (called Patterns) by task and runs them from the command line or a REST API.
A command-line tool and Python library for running prompts and chats against remote and locally installed large language models.