Skip to main content

subverter

Subtitle and transcript readers into one model: SubRip, WebVTT, LRC, CSV and TSV, and whisper-cli's and WhisperX's JSON.

A file read becomes what it holds: its cues, the word timings where the format keeps them, notes on what it held that the model does not, and a refusal -- with its reason -- for what cannot be read.

Format Read as
SubRip cues; WhisperX's highlighted cues read back into words
WebVTT cues, as SubRip's; has_references: its texts hold HTML character references, each run between tags decoded
LRC a line's time, its text
CSV/TSV start, end, text (milliseconds), columns by header, as whisper-cli and WhisperX write them
JSON whisper-cli's and WhisperX's: chunks and word timings

Installing

pip install subverter

Python 3.13 or later; the standard library alone.

Using it

>>> import subverter
>>> reading = subverter.read("srt", b"1\n00:00:01,000 --> 00:00:02,500\nHello <i>there</i>\n", "talk.srt")
>>> reading.cues
(Cue(start=1000, end=2500, text='Hello <i>there</i>', segment=''),)
>>> subverter.untagged(reading.cues[0].text)
'Hello there'
>>> subverter.read("json", b"[1, 2]", "talk.json")
Traceback (most recent call last):
  ...
subverter.Error: not a whisper-cli (.transcription) or WhisperX (.segments) JSON transcript: talk.json

Times are milliseconds. A text that cannot be read is refused: subverter.Error, its message the reason.

Licence

Part of ffsuite, beside ffman: its own package. Licensed under either of MIT or Apache-2.0, at your option.

Metadata

Release files for subverter 0.1.1

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

Source distribution (sdist)

Source distribution for subverter 0.1.1
File Size Uploaded
subverter-0.1.1.tar.gz 23.8 kB Details

Built distribution (wheel)

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

Total release size: 43.3 kB

Release files / subverter-0.1.1.tar.gz

Download URL subverter-0.1.1.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
965623ac5ef4221d5e8b5995e8397919f0b9d0b18fff2a6b20ceaae23c6c7e1e
BLAKE2b-256 checksum
How to use checksums
a605a8c2ab3afea0ebf1a0089e76edecae902598e69729e9bb2f150d2d3734bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 10, 2026.

Transparency log

Release files / subverter-0.1.1-py3-none-any.whl

Download URL subverter-0.1.1-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0274d5024fd5ed512ddbe874ef214c6dadacb9383c01e1bd88f4478728a624b8
BLAKE2b-256 checksum
How to use checksums
a789ebb75bf123a404c79886e43859b68b3c662703c2a589434a5caf9a25f579
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

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