Skip to main content

twat-speech

twat-speech is the speech-domain package for the twat ecosystem. It owns transcription orchestration, subtitle repair, TTS calls, and deterministic dubbing plans while leaving provider clients in twat_genai and audio-file transforms in twat_audio.

Python API

from twat_speech import repair_subtitles, dub_plan, transcribe, synthesize

fixed = repair_subtitles(open("captions.srt").read())
plan = dub_plan("movie.mp4", fixed, language="de")
transcript = transcribe("speech.wav")
speech_file = synthesize("Hello", "hello.wav")

Implemented helpers:

  • parse_srt, format_srt, repair_srt, repair_subtitles.
  • subtitle_transcript for plain transcript extraction.
  • transcribe and synthesize as thin twat_genai provider adapters.
  • dub_plan / create_dub_plan for deterministic dubbing orchestration.
  • optional transcribe(..., preprocess=True) delegates resampling to twat_audio before provider transcription.

CLI

python -m twat_speech --help
python -m twat_speech repair-srt captions.srt captions.fixed.srt
python -m twat_speech dub movie.mp4 captions.fixed.srt --language de
python -m twat_speech transcribe speech.wav
python -m twat_speech synthesize "Hello" hello.wav

Boundaries

  • twat_genai owns speech providers for STT/TTS and future dubbing engines.
  • twat_audio owns audio-file transforms such as resampling, trimming, normalization, and audio extraction.
  • twat_speech owns speech-specific orchestration, subtitles, transcripts, and dubbing plans.

Reference scripts

Reusable subtitle repair ideas from srtmultifix.py, extraction workflows from mkv2srt.py, and planning ideas from vidpredub.py/viddub-* are represented here as package APIs. Provider-specific or workstation-specific batch dubbing scripts remain in reference/bin-img-vid/ because they combine local credentials, shell glue, and one-off media workflows.

Release files for twat-speech 2.7.9

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

Source distribution (sdist)

Source distribution for twat-speech 2.7.9
File Size Uploaded
twat_speech-2.7.9.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for twat-speech 2.7.9
File Interpreter ABI Platform
twat_speech-2.7.9-py3-none-any.whl Python 3 none any Details

Total release size: 25.4 kB

Release files / twat_speech-2.7.9.tar.gz

Download URL twat_speech-2.7.9.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8c3fb431fd483834873ebd1023c486743a1eefbdf7d0d225ca5bc62012d1b652
BLAKE2b-256 checksum
How to use checksums
a7ab084c1efebb22daa737009fcab012e642e2e5eb69c33868baa07aecab9930
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","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 / twat_speech-2.7.9-py3-none-any.whl

Download URL twat_speech-2.7.9-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7541ef3a060e4b45a6d53ac4a504946a6c15d86d5f077ed7e03f3c139837d89
BLAKE2b-256 checksum
How to use checksums
4843e2d19667e5e266b8a2fff8af3e60ee06f7427db7362e50e2e003217e1147
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","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 history Release notifications | RSS feed

This release

2.7.9 This release

2 release files

2.7.8

2 release files

2.7.7

2 release files

2.7.5

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.1.3

2 release files

2.1.1

2 release files

2.0.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.16

2 release files

1.7.15

2 release files

1.7.14

2 release files

0.0.1

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