Skip to main content

ReiboSub

A lightweight Python subtitle toolkit with read/write, format conversion, Chinese Simplified/Traditional conversion, and pluggable, timing-locked LLM translation. Python 3.10+ · Apache-2.0 · early 0.x API.

Install

python -m pip install reibosub

The default installation needs only OpenCC and packaging. It does not install OCR/ASR frameworks, models, CUDA, FFmpeg, Node, or a running website.

Read, write and convert

from reibosub import Cue, Subtitle, convert

subtitle = Subtitle((Cue(1, 0.5, 2.0, "繁體字幕"),), language="zh-Hant")
subtitle.save("input.srt")
loaded = Subtitle.load("input.srt")
loaded.save("output.vtt")
loaded.to_simplified().save("simplified.srt")
loaded.to_traditional().save("traditional.srt")
convert("input.srt", "output.json")
print(loaded.to_text())

Times use seconds. Operations return new objects. Saving refuses to overwrite an existing file unless overwrite=True is explicit. Supported formats: SRT, VTT, ASS/SSA, JSON, BCC, LRC and TXT. Conversions do not preserve all ASS styles, effects or VTT positioning; TXT creates synthetic timings when read.

Translate with your own provider

from getpass import getpass
from reibosub import Subtitle, Translator

client = Translator(
    base_url="https://your-provider.example/v1",  # replace with your endpoint
    api_key=getpass("API key: "),
    model="your-model-id",  # replace with an available compatible model
    glossary={"ReiboSub": "ReiboSub"},
)
client.translate(
    Subtitle.load("input.srt"), source_language="ko", target_language="zh",
).save("output.zh.srt")

Requires a Chat Completions-compatible service and may incur provider charges. Credentials must be supplied explicitly; no website configuration is read. Cue counts, indexes and timing are locked; semantic accuracy still needs review. Implement TranslationBackend.translate_batch() to use a local model or another SDK. The default install already includes the public HTTP translator.

Optional features and diagnostics

python -m pip install 'reibosub[download]'
python -m pip install 'reibosub[asr]'
reibosub doctor core
reibosub setup asr --dry-run

Extras: translate (legacy translation dependencies), download, video, ocr, ocr-cpu, asr, diarization, web, all-cpu, dev. Recognition engines, device compatibility, external tools and model authorization require separate setup. ocr does not choose a CPU/GPU Paddle engine. Do not install ocr-cpu over GPU Paddle. Package diagnosis never installs anything; installation needs explicit consent, e.g. reibosub setup asr --yes, in an isolated environment. Do not modify an environment used by a running service.

The web application, frontend build and complete video workflows use a source checkout, not just this wheel. OCR/ASR extras install dependencies; they are not new stable public Python engine APIs.

Metadata

Release files for reibosub 0.1.0

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

Source distribution (sdist)

Source distribution for reibosub 0.1.0
File Size Uploaded Provenance Actions
reibosub-0.1.0.tar.gz 396.9 kB With provenance Details for reibosub-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reibosub 0.1.0
File Interpreter ABI Platform Actions
reibosub-0.1.0-py3-none-any.whl Python 3 none any Details for reibosub-0.1.0-py3-none-any.whl

Total release size: 789.3 kB

Release files / reibosub-0.1.0.tar.gz

Download URL reibosub-0.1.0.tar.gz
Size 396.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5b2e3c1eeb65e043761830f62b1220878a4b8a392191ab22cf0af076b6bbfe34
BLAKE2b-256 checksum
How to use checksums
6bc93460a9d4dc518ee28398a65e6c04b2130eb56e160e72a67acdd2587e5fa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Release files / reibosub-0.1.0-py3-none-any.whl

Download URL reibosub-0.1.0-py3-none-any.whl
Size 392.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a79ffeac1b6fb124993c5333cf5a49bba2e40a921de7985883de5734a8c57a5
BLAKE2b-256 checksum
How to use checksums
3c427006adca4bc6658dec8f0e32195578ed77c111d86c04648e05a68c2cebc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Security for reibosub 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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for reibosub-0.1.0.tar.gz

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 Nov 21, 2026.

Transparency log

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.

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