Skip to main content

SRT Translator

Build Status License: MIT Python: 3.8+

A robust and feature-rich Python command-line tool for translating SubRip (SRT) subtitle files. Supports Google Translate, DeepL, and MyMemory with intelligent mixed-language handling, HTML tag preservation, and resilient error recovery.

✨ Features

  • Modular Architecture: Easy to extend with new translation services.
  • Multiple Services: Google Translate (default), DeepL, and MyMemory.
  • Resilient Recovery: Automatic retries with exponential backoff and resume capability for interrupted translations.
  • Parallel Processing: Use --workers to speed up translation of large files.
  • Mixed-Language Handling: Sentence-level language detection for mixed subtitles.
  • HTML Tag Preservation: Keeps <i>, <b>, etc., styling intact.
  • Batch Processing: Translate multiple files or entire directories at once.
  • Configuration: Support for .env files for secure API key management.

🚀 Quick Start

Installation

  1. From PyPI (Recommended):

    pip install srt-translator-cli
    
  2. From Source:

    git clone https://github.com/fam007e/srt_trans.git
    cd srt_trans
    pip install .
    

Developer Setup

For developers wanting to run tests and build the package, we provide a Makefile:

# 1. Create venv
python -m venv .venv

# 2. Setup all dev/test dependencies
make setup

# 3. Run all checks (lint, type-check, tests)
make check

# 4. Build binary
make build

# 5. (Optional) Install in editable mode
pip install -e .

Basic Usage

srt-translator-cli movie.srt -t es

📚 Documentation

For more detailed information, please see our dedicated documentation:

🛠 Supported Languages

SRT Translator supports over 70 languages. Run the following command to see the full list:

srt-translator-cli --list-languages

⚖ License

This project is licensed under the MIT License. See the LICENSE file for details.

🙏 Acknowledgements

Metadata

Release files for srt-translator-cli 2026.5.31

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for srt-translator-cli 2026.5.31
File Size Uploaded
srt_translator_cli-2026.5.31.tar.gz 17.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for srt-translator-cli 2026.5.31
File Interpreter ABI Platform
srt_translator_cli-2026.5.31-py3-none-any.whl Python 3 none any Details

Total release size: 32.0 kB

Release files / srt_translator_cli-2026.5.31.tar.gz

Download URL srt_translator_cli-2026.5.31.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ed765816f27211275e1379fc9530c41ef851d7ce10cdbc6f9a9d28bcc41039f7
BLAKE2b-256 checksum
How to use checksums
7adc5e31ed6d9e83922dda2e8c7c75f60e28a0d893fecb62f77fd0085dbcad3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / srt_translator_cli-2026.5.31-py3-none-any.whl

Download URL srt_translator_cli-2026.5.31-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8285d102ad6844246efae87ea4e91dda96fc920a2e60c4b13d8641272a754526
BLAKE2b-256 checksum
How to use checksums
7dc16e852c940451591b0e7ee05c81e624a14c5214cdbe548d2e81d5e80be0ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2026.5.31 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page