Introduction

In recent years, with the rise of online videos, the translation of popular foreign films and TV shows has mostly been handled by video platforms, while traditional subtitle groups have gradually faded from view. However, the demand for subtitles in niche and self-produced videos has not been effectively met, leading to a continuous increase in videos without subtitles. To solve this problem, the Whisper tool can be used to automatically generate subtitles for these raw videos and then translate them into Chinese using translation APIs.

To address issues with existing subtitle translation tools such as slow speed, lack of batch processing, and the need for manual intervention, I developed a free and fully featured subtitle translation tool—Subtitle Translator. This tool supports various subtitle formats including .srt, .ass, .vtt, and .lrc, and offers translation speeds measured in seconds to greatly enhance efficiency. I have successfully transcribed over 500 videos, and the translated subtitle files can be viewed at whisper-subtitles.

Key Features

"Batch Translation"

  • Second-Level Translation: Uses chunk compression and parallel processing of subtitle text to translate an episode of a TV series in just 1 second (the GTX interface is slightly slower).
  • Batch Translation: Supports processing hundreds of subtitle files at once, greatly boosting efficiency.
  • Translation Cache: Automatically caches translation results locally to avoid duplicate API calls, saving both time and costs.
  • Format Compatibility: Automatically matches mainstream subtitle formats (.srt / .ass / .vtt / .lrc) with the exported file keeping the original filename, so no manual adjustments are needed.
  • Subtitle Extraction: Supports extracting subtitle text for later use in AI summarization, secondary creation, and other applications.
  • Multiple Interface Options: Offers 3 free translation methods, 3 commercial-grade translation APIs, and 5 AI LLM (large model) interfaces to meet different needs.
  • Multilingual Support & Internationalization: Supports 50 mainstream languages (including English, Chinese, Japanese, Korean, French, German, Spanish, etc.), and can translate the same subtitle file into multiple languages simultaneously to meet international requirements.

Subtitle Translator provides a wide range of parameter options to suit different user needs. Below is a detailed explanation of each parameter:

Translation APIs

This toolkit integrates 5 translation APIs and 6 mainstream Large Language Model (LLM) interfaces, allowing users to choose the most suitable translation method based on their needs:

Translation API Comparison

API Type Translation Quality Stability Best Use Case Free Quota
DeepL (X) ★★★★★ ★★★★☆ Ideal for long texts, smoother translations 500,000 characters/month
Google Translate ★★★★☆ ★★★★★ Great for UI texts and common sentences 500,000 characters/month
Azure Translate ★★★★☆ ★★★★★ Broadest language support First 12 months: 2 million characters/month
GTX API (Free) ★★★☆☆ ★★★☆☆ General-purpose translation Rate-limited (e.g., ~5 million characters every 3 hours)
GTX Web (Free) ★★★☆☆ ★★☆☆☆ Suitable for small-scale translations Free
  • DeepL: Best for long-form text with natural and fluent output. Does not support web-based API; must be used via local or server-side proxy.
  • Google Translate: Offers stable quality, suitable for short phrases and UI content. Supports web-based calls.
  • Azure Translate: Supports the most languages, ideal for multilingual translation needs.
  • GTX API/Web: Free options suitable for lightweight use. However, they have limited stability and rate caps. For instance, when mrfragger attempted to translate a ~2MB subtitle file (~2 million characters), the GTX API hit its limit after just two translation attempts.

If you require higher speed or quality, you can apply for an API Key here: Google Translate, Azure Translate, DeepL Translate. Refer to the corresponding API Application Guide for instructions.

LLM Translation (AI Language Models)

In addition to traditional APIs, this tool also supports intelligent translation via various LLMs, including: DeepSeek, OpenAI, Azure OpenAI, Siliconflow, Groq, and customizable Custom LLM options.

  • Use Cases: Ideal for content requiring deeper language understanding, such as literary works, technical documents, or multilingual material.
  • Highly Customizable: Supports configuration of system and user prompts, allowing for control over translation style, terminology preferences, and more.
  • LLM Models: Typically requires specifying the model name provided by the selected service; for Azure OpenAI, enter the deployment name instead.
  • Temperature Parameter: Controls creativity vs. stability of the translation output. Higher values yield more diverse and creative results but may reduce accuracy. Lower values ensure stable, consistent output—suitable for formal or technical content.

Local Model Integration Guide

For users deploying LLMs locally (e.g., via Ollama or LM Studio), the following setup instructions apply. For optimal translation quality, we recommend using models such as qwen2.5-14b-instruct or higher-performance alternatives in your custom configuration.

Sample Default Endpoint URLs

  • Ollama:
http://127.0.0.1:11434/v1/chat/completions
  • LM Studio:
http://localhost:61234/v1/chat/completions

CORS Configuration (Cross-Origin Resource Sharing)

If you're encountering connection failures when accessing your local model from a browser, it may be due to cross-origin policy restrictions. Here’s how to fix it:

  • Ollama: Start the service with the following command to allow all origins:
OLLAMA_ORIGINS="*" ollama serve
  • LM Studio:

    1. Open the left-hand menu in the app and click the Developer icon.
    2. Go to the local server settings page and click Settings at the top.
    3. Check the Enable CORS box.

    LM Studio CORS Configuration Screenshot

Once configured, this tool will be able to access your local LLM models successfully. (Special thanks to mrfragger for sharing this setup guide.)

Language Support

This tool supports translation between over 50 languages, encompassing a broad range of European, Asian, and some African languages. It is suitable for various multilingual content processing scenarios. Supported languages include: English, Chinese, Traditional Chinese, Portuguese, Italian, German, Russian, Spanish, French, Japanese, Korean, Arabic, Turkish, Polish, Ukrainian, Dutch, Greek, Hungarian, Swedish, Danish, Finnish, Czech, Slovak, Bulgarian, Slovenian, Lithuanian, Latvian, Romanian, Estonian, Indonesian, Malay, Hindi, Bengali, Vietnamese, Norwegian, Hebrew, Thai, Filipino (Tagalog), Uzbek, Kyrgyz, Turkmen, Kazakh, Bhojpuri, Kannada, Amharic, Gujarati, Javanese, Persian, Tamil, Swahili, Hausa, Telugu, and Marathi.

For detailed information on supported languages, refer to the official documentation of each service:

API Parameters

Chunk Translation Size

For text files with contextual relationships—such as subtitles or Markdown documents—this tool automatically merges multiple lines into "chunks" for translation. The chunk size refers to the maximum number of characters per grouped block. The character limits for each translation service are as follows:

  • DeepL API: Up to 128K characters per request
  • DeepLX Free: Up to 1,000 characters per request
  • Azure Translate: Up to 10,000 characters per request
  • Google Translate:
    • Web version: Up to 5,000 characters per translation
    • Cloud Translation API: Up to 30,000 characters per request

Note: Google Translate disrupts line breaks during processing, so chunked translation is not used with this service.

Delay Time

Delay time sets the wait interval between chunk translations. When processing large volumes of text, some translation APIs may respond slowly—especially under poor network conditions or when using free interfaces. In such cases, delay settings are particularly important.

For example, when testing with Azure Translate’s free tier, it is recommended to set the delay time to 5,000 milliseconds or more to avoid empty responses or errors.

Translation Rate

Setting the translation rate too high may result in empty API responses or cause requests to be flagged as abnormal. It's recommended to adjust the rate based on the specific translation service and its stability to improve success rates and maintain reliable performance.

Feature Description

Subtitle Formats

Subtitle Translator supports various subtitle formats including .srt, .ass, .vtt, and .lrc, and offers automatic format matching:

  • Bilingual Subtitles: When enabled, the translated text is inserted below the original subtitles, and the display position (above/below) can be adjusted.
  • Timeline Compatibility: Supports time formats that omit default hours, exceed 100 hours, and display 1-3 digits for milliseconds to ensure compatibility.
  • Automatic Encoding Recognition: Automatically detects the subtitle file encoding to prevent garbled text, eliminating the need to manually select the encoding.

Translation Modes

Subtitle Translator supports both batch translation and single file mode to accommodate different needs:

Batch Translation (default):

  • Supports processing hundreds of files at once, greatly improving work efficiency.
  • Translated files are automatically saved in the browser’s default download directory without any manual steps.

Single File Mode (suitable for small tasks):

  • Ideal for quick translation of a single subtitle file, and supports direct text pasting for translation.
  • The translation result can be viewed in real time on the webpage and can be manually copied or exported.
  • When single file mode is enabled, uploading a new file will overwrite the previous one.

Translation Cache

This tool introduces an optional local translation cache to improve translation efficiency and reduce resource consumption:

  • Cache rules: Each translation result is stored with a unique key formatted as source text_target language_source language_translation API_model settings.
  • Cache hit condition: The local cache result is used only when the parameters match exactly, ensuring accuracy.
  • Cache purpose: Avoid repeated translations, reduce API calls, and improve translation speed.

To disable the use of translation cache, you can uncheck "Use translation cache" or click "Clear translation cache" in the API settings.

Multilingual Translation

Supports translating the same file into multiple languages at once, which is especially suitable for international video content:

  • For example: Translate an English file simultaneously into Chinese, Japanese, German, and French for the convenience of global users.
  • Supports 50 major languages, with more to be added continually.

Export and Import Settings

Supports one-click export and import of current settings, making it easy to migrate data when switching devices or moving to a custom domain.

Please note:

  • The exported file will contain all configuration information, including sensitive data such as API keys;
  • Keep the exported file secure to prevent data leaks or misuse;
  • Importing settings will overwrite existing configurations—please double-check before proceeding.

FAQ

Why is the translation result empty, showing only the original text, or displaying as null?

This issue may be caused by one of the following reasons:

  • The API Key or related settings are incorrect;
  • Your account has run out of available credits/tokens;
  • The translation rate is set too high, or the API service is temporarily unstable.

You can press F12 to open the browser's Developer Tools, switch to the "Network" tab, and check the specific error message in the API response.

If only part of the content failed to translate, try clicking the “Translate” button again. When translation caching is enabled, the system will skip already translated content to avoid duplicate charges or requests.

Why use a third-party interface to access DeepL?

DeepL's official service does not allow direct access via web pages, so we use an intermediate gateway to send your request.

This relay interface only transmits data and does not collect any personal information, so you can use it with confidence. If you require greater stability, you may set up your own gateway.

Will my API Key be saved?

No! Your API Key and other settings are stored only in your own browser. We do not upload or record any of your information.

Why isn’t the GTX Web interface enabled?

GTX Web puts significant load on the server, so it is disabled by default.

If you're using this tool on your own computer, you can enable it manually. Please avoid using it under a global proxy network, as this may cause translation issues.