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.7.tar.gz (15.7 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.7-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: twat_speech-2.7.7.tar.gz
  • Upload date:
  • Size: 15.7 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.7.tar.gz
Algorithm Hash digest
SHA256 4c876669883f3fdc47e01c1f9dd86a1fc4eec12cdabf580779a76d1200f202a8
MD5 1a0d7ff197f0fc1bc90287c9ec512300
BLAKE2b-256 f3f23b81e9192648fdd06cfc05442fe48f876e5ef2efc0954565d2b4714c105a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: twat_speech-2.7.7-py3-none-any.whl
  • Upload date:
  • Size: 8.7 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 83fdcc5f847d43b82fa3b82283539d149fdaa865736f14bb41eff27eee2058b8
MD5 402e041f76291800c4a60f1aec03a970
BLAKE2b-256 0b862ed0e55b266c1a0a9011d6b3754c75d3a7057814d3663fe9f8cbf08faec5

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