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, and .vtt, 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) 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 35 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 API

This tool supports 5 translation APIs and 5 LLM (large language model) interfaces, allowing users to choose the appropriate translation method based on their needs:

Comparison of Translation APIs

API Type Translation Quality Stability Suitable Scenarios Free Quota
DeepL(X) ★★★★★ ★★★★☆ Suitable for long texts; smoother translations 500,000 characters per month
Google Translate ★★★★☆ ★★★★★ Ideal for UI text and common phrases 500,000 characters per month
Azure Translate ★★★★☆ ★★★★★ Broadest language support 2,000,000 characters per month for the first 12 months
GTX API (Free) ★★★☆☆ ★★★☆☆ General text translation Free
GTX Web (Free) ★★★☆☆ ★★☆☆☆ Suitable for small-scale translation Free
  • DeepL: Ideal for long texts with smoother and more natural translations; however, it does not support web API calls and requires local or server-side proxy usage.
  • Google Translate: Offers stable translation quality, suitable for short sentences and UI text, and supports web API calls.
  • Azure Translate: Provides the widest range of language support, meeting diverse multilingual translation needs.
  • GTX API/Web: A free translation option suitable for small-scale use, though its stability is average.

For higher translation speed and quality, you can apply for an API Key from Google Translate, Azure Translate, or DeepL Translate. Refer to the related API application tutorial for the application process.

LLM Translation (AI Large Models)

This tool provides access to five mainstream AI large models (LLMs) or interfaces: OpenAI, DeepSeek, Siliconflow, Groq, and Custom LLM.

  • Use Cases: Ideal for handling content that requires high-level language understanding, such as literary works, technical documents, and multilingual materials.
  • Customizability: Supports custom system prompts and user prompts, allowing flexible adjustments to translation style and terminology preferences to better suit different scenarios.
  • Temperature Parameter: Controls the randomness of translation results. Higher values produce more creative outputs but may affect consistency and accuracy.

The Custom LLM option allows integration with third-party services or local inference platforms (such as ollama) by configuring the API endpoint and model name. For example, the default API endpoint for a local ollama setup is:

http://127.0.0.1:11434/v1/chat/completions

The default model used is llama3.2. For LM Studio, the local API endpoint is:

http://localhost:61234/v1/chat/completions

To achieve better translation quality, it is recommended to use qwen2.5-14b-instruct or a higher-performing model in the Custom LLM setup.

Language Support

In terms of multilingual translation capabilities, Google, Azure, and large language models (LLMs) support translation between hundreds of languages, while DeepL currently supports only 30 mainstream languages. Therefore, in terms of language coverage, DeepL is relatively weaker.

For a detailed list of supported languages, please refer to the official documentation:

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, and .vtt, 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 35 mainstream languages and will continue to expand.

Usage Notice

When using this tool, please note the following:

  • DeepL support: Since the DeepL API does not support direct calls from the web, a server-side forwarding interface is provided solely for data transmission, and it will not collect user data. For better stability, users can also choose to deploy this interface themselves.
  • Using the DeepLX free interface may sometimes return null. Please wait a moment and try again, or use your own API KEY or deploy your own forwarding interface.
  • API Key security: This tool does not store your API key; all configuration data is saved in your local browser.
  • GTX Web interface: This interface places considerable load on the server, so it is recommended to enable it manually only when deploying locally. Please avoid using it in networks with a global proxy enabled to prevent translation errors.