Pipeline transcribe + forced alignment + speaker diarization built on Faster-Whisper, NeMo, Demucs, and FastAPI.
No. On a new machine, pip install -r requirements.txt alone is not enough.
You also need:
ffmpeginstalled at the OS level and available onPATHtorchandtorchaudioinstalled separately for the correct runtime (cpuor your CUDA version)- Python
3.10+ - Internet access on the first run so Whisper / NeMo / punctuation models can be downloaded
This repo is prepared for Python 3.10 to 3.12.
Recommended workflow on a fresh machine:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel cython uvUbuntu / Debian:
sudo apt update
sudo apt install -y ffmpegmacOS:
brew install ffmpegWindows:
winget install ffmpegCPU only:
python -m pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpuCUDA example:
python -m pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu124Pick the PyTorch index that matches the actual machine / CUDA driver. If you are not using GPU, install the CPU build.
python -m pip install -c constraints.txt -r requirements.txt
python -m pip install -e .pip install -e . is recommended so the package metadata and CLI entrypoint are registered locally.
Run:
python scripts/check_environment.py
whisper-diarize --helpIf both commands work, the environment is usually ready.
Basic CLI:
python diarize.py -a path/to/audio.wavInstalled CLI:
whisper-diarize -a path/to/audio.wavUseful options:
--device cputo force CPU mode--no-stemto skip Demucs source separation--diarizer sortformerto use the realtime-friendly diarizer--speakers-dir speakers/to mapSpeaker Nto known speaker names
Example:
whisper-diarize -a meeting.mp3 --device cpu --diarizer sortformer --no-stemtimeout 20s uvicorn web_realtime:app --host 0.0.0.0 --port 8000Then open http://localhost:8000.
- The first run downloads multiple models, so startup can be slow.
demucsand audio decoding depend onffmpeg; without it the pipeline is incomplete.speaker_identification.pyalso needstorchaudioat runtime.- If you commit this repo, avoid committing generated audio outputs,
build/,speakers/, caches, andtemp_outputs_*.
- Run
python scripts/check_environment.py - Run
python -m compileall diarize.py web_realtime.py speaker_identification.py helpers.py diarization scripts - Make sure no generated outputs or local speaker samples are staged
- Keep
requirements.txt,constraints.txt,pyproject.toml, andREADME.mdin sync