twat-audio
twat-audio is the audio-file domain package for the twat ecosystem. It preserves the existing Pedalboard resampling API and adds deterministic ffmpeg-backed helpers for common audio-file workflows.
Requirements
- Python 3.10+
pedalboardfor resamplingffmpeg/ffprobefor metadata, trimming, extraction, normalization, and muxing helpers
Python API
from twat_audio import AudioProcessConfig, resample_audio, normalize_audio, trim_audio
resample_audio(AudioProcessConfig("input.wav", "speech-16k.wav", target_samplerate=16000.0))
normalize_audio("input.wav", "normal.wav")
trim_audio("input.wav", "intro.wav", start=0, duration=5)
Implemented helpers:
resample_audio: existing Pedalboard resampling behavior.audio_metadata: ffprobe metadata.normalize_audio,trim_audio,extract_audio.replace_audio: import/replace media audio tracks.simple_effect: explicit ffmpeg audio filter helper for deterministic effects.generate_audio: optional thin adapter totwat_genaiaudio providers.
Speech-specific STT, TTS, and dubbing orchestration belong in twat_speech; this package stays focused on audio files and signals.
CLI
python -m twat_audio --help
python -m twat_audio resample input.wav speech.wav --samplerate 16000
python -m twat_audio normalize input.wav normal.wav --dry-run
python -m twat_audio trim input.wav clip.wav --start 2 --duration 5 --dry-run
python -m twat_audio extract movie.mp4 voice.wav --dry-run
python -m twat_audio replace silent.mp4 voice.wav dubbed.mp4 --dry-run
Reference scripts
The audio portions of vidimportaudio, vidpredub.py, viddub-*, and vidreverb.py are represented here only where they are deterministic audio-file operations. Dubbing plans, speech provider calls, transcript handling, and subtitle work live in twat_speech.
Release files for twat-audio 2.7.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| twat_audio-2.7.10.tar.gz | 24.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| twat_audio-2.7.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.8 kB
Release files / twat_audio-2.7.10.tar.gz
| Download URL | twat_audio-2.7.10.tar.gz |
|---|---|
| Size | 24.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9437e59957d0c2fc926a5235eb85ab1349bd43a7e95818f0f561498168eeafc4
|
|
BLAKE2b-256 checksum How to use checksums |
571e6d38096cda73ca67f24b9cd5291c4054fa7e4352ca2f561e8dbd648d756f
|
| 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_audio-2.7.10-py3-none-any.whl
| Download URL | twat_audio-2.7.10-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c335f838de3c5e59cfb87a3c63790e53b39924702457a6eb9e2998b76cdc0a3
|
|
BLAKE2b-256 checksum How to use checksums |
a2b5e0e27c692adf98efcefd408663399418e94e17bb38a62b333be74d5a8c6d
|
| 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}
|