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

Uploaded Python 3

File details

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

File metadata

  • Download URL: twat_speech-2.7.8.tar.gz
  • Upload date:
  • Size: 15.8 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.8.tar.gz
Algorithm Hash digest
SHA256 767feb03d645e1c7ff054afc4409850b2a38afd6f1297d28c8676d921739108a
MD5 6d5ffe9f23bfb89e09b4979171d46b95
BLAKE2b-256 b6c51855f34a5dc5545f2648e8d5fa7ac802afd07fcb5338715872b9aba0d0c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: twat_speech-2.7.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 62daa8c59961078f6e0e8f470974779d7b4acb527b0bdab8a7859afa50f5598c
MD5 8dcaa94145890962750a4e2da82da676
BLAKE2b-256 81c6b6c8920c407bcb1683da59c04335f2520f852a865e522ee59524dd04debf

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