Srtx
Srtx is a typed, package-first Python library and CLI for translating SRT subtitles and transcribing audio or video with Google Gemini.
It is the clean, object-oriented successor to gemini-srt-translator.
Workflows live in reusable services, the Typer CLI is a thin adapter, and the
package has no GUI dependency.
Features
- SRT translation with preserved timing, formatting, and RTL text
- Audio and video transcription
- Embedded subtitle and speech-focused audio extraction
- Streaming Gemini responses and configurable generation controls
- AI Studio and Google Cloud Enterprise/Vertex authentication
- Resumable workflows with atomic checkpoints
- Token-aware batching, retries, API-key rotation, and recovery splitting
- Structured progress, operational logs, and safe explanatory events
- Reporter adapters for terminals, files, tests, and GUI applications
Quick start
Srtx requires Python 3.13 or newer. FFmpeg and ffprobe are required for media workflows.
python -m pip install srtx
export GEMINI_API_KEY="your-key"
srtx translate subtitles.srt --language French
srtx transcribe interview.mp4 --output interview.srt
srtx extract movie.mkv --subtitles
srtx models
Use Srtx as a library:
from pathlib import Path
from srtx.domain.settings import GeminiAuthSettings
from srtx.domain.translation import TranslationRequest, TranslationSettings
from srtx.infrastructure.gemini.factory import GeminiClientFactory
from srtx.infrastructure.subtitles import SrtRepository
from srtx.services.translation_service import TranslationService
client = GeminiClientFactory().create(
GeminiAuthSettings(api_key="your-key")
)
service = TranslationService(
subtitle_repository=SrtRepository(),
gemini_client=client,
token_counter=client,
)
result = service.translate(
TranslationRequest(
source_path=Path("input.srt"),
output_path=Path("output.srt"),
settings=TranslationSettings(target_language="French"),
)
)
Documentation
The Srtx wiki contains:
- Installation and authentication
- Complete CLI guide
- Using Srtx inside Python projects
- Translation, transcription, and media API guides
- Progress reporters and GUI integration
- Architecture, development, migration, and troubleshooting
Development
uv sync --all-groups
uv run pytest
uv run ruff check .
uv run pyright
uv build
License
Srtx is licensed under GPL-3.0-only.
Metadata
Release files for srtx 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| srtx-0.1.0.tar.gz | 60.8 kB | Without provenance | Details for srtx-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| srtx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for srtx-0.1.0-py3-none-any.whl |
Total release size: 142.0 kB
Release files / srtx-0.1.0.tar.gz
| Download URL | srtx-0.1.0.tar.gz |
|---|---|
| Size | 60.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd8156c6e2d7f4949b3045a4cd0779f3593d8e87086fe208c5748949a3c9bf99
|
|
BLAKE2b-256 checksum How to use checksums |
11ad42acf1afd7e80e1d64a1065aea81626a1238699d4262ff4b3e224b9b6a17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / srtx-0.1.0-py3-none-any.whl
| Download URL | srtx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 81.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d78e7d822098c3dd75a47c8a759524ea5f0435b436e891a0807d8239ba2e247a
|
|
BLAKE2b-256 checksum How to use checksums |
ad2a299d629083d4b05cd919e65086e8de45cc754347fa2ab072018a0656696e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for srtx 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.