MahmoudAshraf97/whisper-diarization
Automatic Speech Recognition with Speaker Diarization based on OpenAI Whisper
What it solves
It solves the problem of identifying "who spoke when" in an audio recording. While standard transcription tools can turn speech into text, they often fail to distinguish between different speakers in a conversation, making it difficult to follow the dialogue in the resulting transcript.
How it works
The project implements a multi-stage pipeline to process audio:
- Vocal Extraction: Uses source separation to isolate vocals from background noise to improve embedding accuracy.
- Transcription: Generates text using OpenAI Whisper.
- Alignment: Uses
ctc-forced-alignerto correct and align timestamps, reducing time-shift errors. - Voice Activity Detection (VAD): Employs MarbleNet to detect speech segments and exclude silences.
- Speaker Embedding: Uses TitaNet to extract unique speaker embeddings for each segment.
- Association: Maps the identified speakers to the specific words and timestamps, then uses punctuation models for final realignment.
Who it’s for
Researchers and developers who need high-accuracy speaker diarization (identifying different speakers) combined with automated speech-to-text transcription.
Highlights
- Hybrid Architecture: Combines Whisper for ASR with NVIDIA NeMo (MarbleNet and TitaNet) for diarization.
- Timestamp Correction: Integrates forced alignment to minimize errors caused by time shifts.
- Parallel Processing: Includes an experimental parallel mode (
diarize_parallel.py) for systems with high VRAM to speed up processing. - Customizable: Supports various Whisper models, manual language selection, and batch size adjustments.
Related
- Project
- Project
- Project
- Dispatch
- Project