Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

TransAudio

TransAudio is a Python CLI for audio/video transcription using Whisper, with optional speaker diarization through pyannote.

Highlights

  • 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.

Project Layout

.
|-- .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

Requirements

  • Python 3.9+
  • System ffmpeg in your PATH for transcription modes
  • Hugging Face token for diarization mode

Installation

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]

CLI Usage

Show profiles:

transaudio profiles

Transcribe with default modern profile:

transaudio transcribe input.wav -o output.txt

Run a legacy-equivalent profile:

transaudio transcribe input.mp4 --profile legacy-2-1

Diarization mode (token from env):

set HUGGINGFACE_TOKEN=hf_xxx
transaudio transcribe meeting.mp3 --profile legacy-3-2

Override profile defaults:

transaudio transcribe input.wav --profile modern --model medium --chunk-seconds 20

Legacy Script Compatibility

The original script filenames are retained as wrappers that now call the modern CLI:

  • scripts/legacy/AudioTrans.py -> legacy-1
  • scripts/legacy/AudioTrans2-0.py -> legacy-2-0
  • scripts/legacy/AudioTrans2-1.py -> legacy-2-1
  • scripts/legacy/AudioTrans3-0.py -> legacy-3-0
  • scripts/legacy/AudioTrans3-1.py -> legacy-3-1
  • scripts/legacy/AusioTrans3-2.py and scripts/legacy/AudioTrans3-2.py -> legacy-3-2

Example wrapper call:

python scripts/legacy/AudioTrans2-1.py input.mp4 -o transcript.txt

Development

Run tests:

pytest

Run lint:

ruff check .
ruff format --check .

Run typing:

mypy src

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages