machinewrapped/llm-subtrans

Open Source project using LLMs to transcribe and translate subtitles (SRT, SSA/ASS, VTT)

What it solves

Manually translating subtitles into another language is slow and repetitive. LLM-Subtrans automates this by splitting subtitle text into batches and sending each batch to a language model of your choice, translating between any language pair the model supports. It also covers the case where no subtitles exist at all: it can transcribe audio and video files — with speaker labels on supported models — and then translate that transcription through the normal workflow.

How it works

Subtitles are divided into batches and each batch is sent to the chosen translation service in turn, so one subtitle file may trigger many API calls depending on batch size and model speed. Translated output is written to a new file in the same folder, with the target language appended to the original filename. Providers are pluggable: API keys are stored in a .env file or the app settings, and options include Google Gemini, OpenAI (with optional ChatGPT-plan sign-in), DeepSeek, Anthropic Claude, Mistral, several gateways (OpenRouter, Requesty, Opper, API Route, DemonRoute, Atlas Cloud, Runcrate), Amazon Bedrock, and any server exposing an OpenAI-compatible API — including locally hosted models like LM Studio (though the README warns local models produce weak translations). For transcription, media files are processed by cloud speech-to-text services or by local models (Qwen3-ASR or MOSS-Transcribe-Diarize) running in a separate PyTorch environment; speaker labels are passed to the translator with each line to help interpret scenes. Transcription requires ffmpeg/ffprobe. Note that subtitles and audio clips are sent to the provider's servers, so their privacy policy applies.

Who it's for

Subtitle translators, fan-sub groups, media archivists, or anyone who wants a fast automated way to translate existing subtitles — or generate and translate subtitles from raw audio/video. It suits both GUI users (packaged builds for Windows and usually MacOS Apple Silicon) and command-line users (Linux requires a source install). Users need to bring an API key or a provider plan, and may optionally set up local transcription, which downloads several GB of model weights and requires Python 3.10+.

Highlights

  • Translates .srt, .ssa/.ass, and .vtt subtitle files between any language pair supported by the model, with format conversion during translation (e.g. ASS to SRT).
  • Broad provider support: Google Gemini, OpenAI, DeepSeek, Anthropic Claude, Mistral, OpenRouter, Requesty, Opper, API Route, DemonRoute, Atlas Cloud, Runcrate, Amazon Bedrock, plus custom servers with OpenAI-compatible APIs.
  • Transcribes video and audio files (mp4, mkv, mp3, wav, ...) with word timestamps and speaker diarization on supported models, improving translation timing and accuracy.
  • Two local transcription options keep audio on your machine: Qwen3-ASR (a beta feature) and MOSS-Transcribe-Diarize, each running in its own environment.
  • Offered as a graphical app (gui-subtrans) and as command-line tools (llm-subtrans plus per-provider wrappers like gpt-subtrans, gemini-subtrans, claude-subtrans).

Related

  • Project
  • Project
  • Project
  • Project
  • Project