TransAudio is a Python CLI for audio/video transcription using Whisper, with optional speaker diarization through pyannote.
src/-based package layout with reusable modules.- Single CLI with profile presets that preserve legacy script variants.
- Optional heavy dependencies via extras.
- GitHub-ready baseline: tests, linting, typing, CI.
.
|-- .github/workflows/ # CI workflow
|-- scripts/legacy/ # Legacy compatibility wrappers
|-- scripts/diagnostics/ # Environment diagnostics
|-- src/transaudio/ # Package source
|-- tests/ # Unit tests (lightweight, no model downloads)
`-- pyproject.toml
- Python 3.9+
- System
ffmpegin yourPATHfor transcription modes - Hugging Face token for diarization mode
python -m pip install -e .[transcribe]Add diarization support:
python -m pip install -e .[transcribe,diarization]For development tools:
python -m pip install -e .[dev]Show profiles:
transaudio profilesTranscribe with default modern profile:
transaudio transcribe input.wav -o output.txtRun a legacy-equivalent profile:
transaudio transcribe input.mp4 --profile legacy-2-1Diarization mode (token from env):
set HUGGINGFACE_TOKEN=hf_xxx
transaudio transcribe meeting.mp3 --profile legacy-3-2Override profile defaults:
transaudio transcribe input.wav --profile modern --model medium --chunk-seconds 20The original script filenames are retained as wrappers that now call the modern CLI:
scripts/legacy/AudioTrans.py->legacy-1scripts/legacy/AudioTrans2-0.py->legacy-2-0scripts/legacy/AudioTrans2-1.py->legacy-2-1scripts/legacy/AudioTrans3-0.py->legacy-3-0scripts/legacy/AudioTrans3-1.py->legacy-3-1scripts/legacy/AusioTrans3-2.pyandscripts/legacy/AudioTrans3-2.py->legacy-3-2
Example wrapper call:
python scripts/legacy/AudioTrans2-1.py input.mp4 -o transcript.txtRun tests:
pytestRun lint:
ruff check .
ruff format --check .Run typing:
mypy src