Skip to main content

Speech, subtitle, TTS, and dubbing helpers for the twat plugin ecosystem

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twat_speech-2.7.9.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

twat_speech-2.7.9-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file twat_speech-2.7.9.tar.gz.

File metadata

  • Download URL: twat_speech-2.7.9.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for twat_speech-2.7.9.tar.gz
Algorithm Hash digest
SHA256 8c3fb431fd483834873ebd1023c486743a1eefbdf7d0d225ca5bc62012d1b652
MD5 b3c3a331803edf395ecbfb3a4a53e84c
BLAKE2b-256 a7ab084c1efebb22daa737009fcab012e642e2e5eb69c33868baa07aecab9930

See more details on using hashes here.

File details

Details for the file twat_speech-2.7.9-py3-none-any.whl.

File metadata

  • Download URL: twat_speech-2.7.9-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for twat_speech-2.7.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e7541ef3a060e4b45a6d53ac4a504946a6c15d86d5f077ed7e03f3c139837d89
MD5 873b9bcaad3864df18cf49b7667285c2
BLAKE2b-256 4843e2d19667e5e266b8a2fff8af3e60ee06f7427db7362e50e2e003217e1147

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page