gpt-subtrans  by machinewrapped

Subtitle translator using LLMs

created 2 years ago
471 stars

Top 65.6% on sourcepulse

GitHubView on GitHub
Project Summary

GPT-Subtrans is an open-source tool that leverages Large Language Models (LLMs) to translate SRT subtitle files. It supports multiple LLM providers, including OpenAI, Google Gemini, Anthropic Claude, DeepSeek, and Mistral AI, making it a versatile solution for subtitle localization for content creators and media professionals.

How It Works

The tool processes subtitle files by dividing them into small batches, which are then sent to the chosen LLM provider for translation. This batching approach, combined with configurable minbatchsize and maxbatchsize parameters, aims to balance translation speed, cost, and accuracy while minimizing desynchronization issues. Advanced options like preprocess and postprocess allow for further refinement of subtitle quality.

Quick Start & Requirements

  • Installation: Download pre-packaged releases for Windows or macOS (Apple Silicon only). For other platforms or modifications, clone the repository and install from source.
  • Prerequisites: Python 3.10+ and pip. API keys for chosen LLM providers are required.
  • Setup: Installation scripts are provided for common providers. Manual setup involves creating a virtual environment and installing dependencies.
  • Documentation: Project wiki for detailed usage.

Highlighted Details

  • Supports multiple LLM providers via a provider-based architecture.
  • Offers both a GUI and command-line interface for flexibility.
  • Includes advanced options for batching, preprocessing, and postprocessing subtitles.
  • Allows customization of prompts and substitution rules for specific translation needs.

Maintenance & Community

The project is actively maintained, with version 1.0 indicating stability. Community contributions are welcomed via pull requests.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

  • macOS Intel builds are not provided due to PyInstaller issues; installation from source is required.
  • Linux prebuilt packages are not provided; installation from source is mandatory.
  • Amazon Bedrock integration is complex and not included in pre-packaged versions.
  • Translation quality is dependent on the chosen LLM provider and its specific model capabilities.
Health Check
Last commit

21 hours ago

Responsiveness

1 day

Pull Requests (30d)
3
Issues (30d)
1
Star History
31 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.