subtatix (0.1.0)

Published 2026-06-18 09:52:14 +00:00 by chris-paganon

Installation

pip install --index-url  subtatix

About this package

CLI for generating and translating SRT subtitles with WhisperX

Subtatix

Subtatix is a small CLI for generating .srt subtitles from audio or video files with WhisperX, with optional subtitle translation.

It transcribes the input, aligns subtitle timings with WhisperX, and can then translate the resulting subtitle lines into another language.

Requirements

  • Python 3.12+
  • ffmpeg installed separately and available on your PATH
  • Enough disk space for model downloads and caching

The first run will be slower because WhisperX and translation models need to be downloaded. Subsequent runs reuse the cached models and do not need to download them again unless the cache is cleared.

ffmpeg is an external system dependency. It is not installed by pip, uvx, or uv tool install.

Installation

Run without installing:

uvx subtatix --help

Install as a tool with uv:

uv tool install subtatix

Install with pip:

pip install subtatix

Usage

Run the CLI:

subtatix input.mp4

Transcribe to a specific output path:

subtatix input.mp4 --output some-path/some-file-name

--output is a base path, not a full .srt filename. This writes some-path/some-file-name.srt. If you also translate to Spanish, it writes some-path/some-file-name.es.srt.

Set the source language explicitly:

subtatix input.mp4 --source-language en

Translate after transcription:

subtatix input.mp4 --to es

This writes both the original transcription SRT and the translated SRT by default.

If CUDA runs out of memory on larger files, reduce the batch size or force CPU mode:

subtatix input.mp4 --batch-size 4
subtatix input.mp4 --device cpu

To discard the original transcription and only keep the translated output:

subtatix input.mp4 --to es --discard-transcription

Passing an --output value that ends in .srt is rejected. Use a base path such as --output subtitles instead.

List supported language codes:

subtatix --list-languages
subtatix --list-target-languages

Models

By default, transcription uses WhisperX with the Whisper model large-v2. This is a good general default when you want higher transcription quality and aligned subtitle timings, but it is heavier and slower than smaller Whisper models.

Translation uses facebook/nllb-200-1.3B. The CLI accepts simple target codes such as en, es, fr, de, pt, ja, ko, zh, and also raw NLLB codes such as spa_Latn.

Other model options can also be used:

  • For transcription, you can pass another Whisper model with --model, such as small, medium, or large-v3, depending on your speed and accuracy needs.
  • For translation, the code currently defaults to the NLLB model above, but the translation layer is built around Hugging Face seq2seq models and could be adapted to use a different multilingual translation model if needed.

Requirements

Requires Python: >=3.12
Details
PyPI
2026-06-18 09:52:14 +00:00
5
Chris Paganon
20 KiB
Assets (2)
Versions (7) View all
0.2.4 2026-07-06
0.2.3 2026-06-30
0.2.2 2026-06-30
0.2.1 2026-06-30
0.2.0 2026-06-30