Skip to content

rockbenben/subtitle-translator

Repository files navigation

⚡️ Subtitle Translator

English | 中文

Blazing-fast batch subtitle translation for 50+ languages — powered by AI

License: MIT Live Demo

Subtitle Translator is a batch subtitle translation tool supporting .srt, .ass, .vtt, and .lrc formats. With real-time translation speeds, it leverages multiple translation APIs and AI models to quickly translate subtitle files into 50+ languages, including the ability to translate a single file into multiple languages at once for global accessibility.

👉 Try it online: https://tools.newzone.top/en/subtitle-translator

Key Features

Batch Translation Demo

  • Real-time Translation: Uses chunked compression and parallel processing to achieve 1-second translation per episode.
  • Batch Processing: Handles hundreds of subtitle files at once, significantly boosting efficiency.
  • High-Performance Caching (IndexedDB): Stores translation results in IndexedDB with unlimited capacity—no more browser storage limits.
  • Context-Aware Translation (AI models only): Translates with surrounding context for more coherent dialogue.
  • Format Compatibility: Automatically detects .srt, .ass, .vtt, and .lrc formats, preserving original file names.
  • Bilingual Output: Insert translations below original text with adjustable positioning.
  • Subtitle Extraction: Export clean text for AI summarization, content repurposing, and more.
  • Multi-language Support: Translate into 50+ languages simultaneously from a single file.

Translation APIs

Subtitle Translator supports 5 translation APIs and 9 AI LLM models:

Traditional APIs

API Quality Stability Free Tier
DeepL (X) ★★★★★ ★★★★☆ 500K chars/month
Google Translate ★★★★☆ ★★★★★ 500K chars/month
Azure Translate ★★★★☆ ★★★★★ 2M chars/month (first 12 months)
GTX API (Free) ★★★☆☆ ★★★☆☆ Free (rate-limited)
GTX Web (Free) ★★★☆☆ ★★☆☆☆ Free

LLM Models

Supports DeepSeek, OpenAI, Gemini, Azure OpenAI, Siliconflow, Groq, OpenRouter, Perplexity, and Custom LLM.

  • Best for: Literary works, technical documents, and multilingual dialogue.
  • Customization: Configure system prompts and user prompts for personalized translation styles.
  • Temperature Control: Adjust AI creativity (0–1 scale).

Context-Aware Translation

Context-Aware Translation (AI models only) sends subtitles to the LLM in batches with preceding and succeeding context, ensuring more coherent character dialogue and natural tone.

Two key parameters control this process:

  • Concurrent Lines: Maximum lines translated simultaneously (default: 20). Too high may trigger rate limits.
  • Context Lines: Lines included per batch for context (default: 50). Higher values improve coherence but may exceed token limits.

⚠️ Tip: Models under 70B parameters may produce misaligned output. Mainstream online large models are recommended.

Subtitle Format Support

  • Bilingual Subtitles: Translated text inserted below original; position adjustable (top/bottom).
  • Timeline Compatibility: Supports 100+ hour timestamps and 1–3 digit millisecond formats.
  • Automatic Encoding Detection: Prevents character encoding issues automatically.

Translation Modes

  • Batch Mode (Default): Process hundreds of files simultaneously; results auto-download.
  • Single-File Mode: Quick translation with instant preview; each upload replaces the previous.

Documentation & Deployment

For detailed configuration, API setup, and self-hosting instructions, see the Official Documentation.

Quick Deployment: Deploy Guide

Contributing

Contributions are welcome! Feel free to open issues and pull requests.

License

MIT © 2025 rockbenben. See LICENSE.

About

Fast, accurate, and batch subtitle translation for 50+ languages. 批量字幕翻译

Topics

Resources

License

Stars

Watchers

Forks

Packages