← Back to Leaderboard
WMahmoudAshraf97

MahmoudAshraf97/whisper-diarization

Local Whisper and NeMo CLI for speaker-attributed transcripts

View on GitHub ↗
Open-Source AI AppQuickstart ↓
Engineering Health (Methodology)
B · 57/100
Maintenance Activity
● Updated 3mo ago
Latest Release
Rolling commits (main)
Commercial License Check
BSD-2-Clause · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance12/35
Fork Adoption19/25
Release Cadence6/20
License Clarity20/20
CLIGPULocal AI
Total Stars
★ 5,677
24h Growth
+1
7d Growth
+3
Forks
500

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

MahmoudAshraf97/whisper-diarization Star History (2023-01-24 - 2026-12-03) ALL-TIME STAR HISTORY (2023-01 – 2026-12) +5.7k in 1409d · avg +4/day 6k 3k 0 2023-01-24: ★ 12023-04-22: ★ 1652023-07-22: ★ 6232023-10-21: ★ 1,0012024-01-20: ★ 1,4732024-04-20: ★ 1,9012024-07-20: ★ 2,3902024-10-19: ★ 3,4362025-01-18: ★ 3,9102025-04-19: ★ 4,3202025-07-19: ★ 4,6652025-10-18: ★ 4,9782026-01-17: ★ 5,2502026-04-18: ★ 5,4462026-07-18: ★ 5,5742026-12-03: ★ 5,677 ★ 5.7k 2023-01 2024-12 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

This is a local, file-oriented Python pipeline, with diarize.py as the main entrypoint and a companion notebook. It first extracts vocals with Demucs unless separation is disabled, transcribes with faster-whisper, and refines word timestamps with ctc-forced-aligner. The NeMo branch uses MarbleNet for voice activity detection and segmentation, then TitaNet for speaker embeddings.

The branches meet on the audio timeline: aligned words are mapped to speaker segments, and punctuation is used to refine sentence grouping around small timing shifts. The stack includes nemo_toolkit[asr] >=2.5.0, <3, faster-whisper>=1.1.0, nltk, and Git-sourced Demucs, deepmultilingualpunctuation, and ctc-forced-aligner. Some Whisper and NeMo settings are fixed in diarize.py and helpers.py, so deeper tuning requires editing Python rather than passing CLI flags.

Key Capabilities & Differentiators

The pipeline produces speaker-attributed transcription from an audio file. It uses word-level timing internally to decide who spoke and then organizes the transcript into sentences. --whisper-model defaults to the English-only medium.en; for non-English audio, choose a multilingual model rather than relying on --language alone. The language flag is useful when automatic detection fails.

Use --no-stem to bypass vocal separation and --suppress_numerals to write numbers as words, which can improve alignment. --device selects the runtime device, defaulting to CUDA when available. Lower --batch-size to reduce memory pressure or set it to 0 for non-batched inference. A maximum sentence length for SRT subtitles is planned, not an available control.

Trade-offs & Limitations

Compared with plain Whisper, this pipeline adds speaker attribution and timestamp reconciliation at the cost of additional model stages and a more involved installation. Compared with wiring Whisper to a separate diarization stack such as pyannote.audio, it provides a ready-made mapping from word timings to speaker segments, but exposes only part of that pipeline through CLI settings. Compared with a managed speech API, local execution keeps audio processing on your hardware while making you responsible for runtime maintenance and capacity.

Overlapping speech remains unresolved: extracting vocals does not separate one speaker from another. The experimental parallel entrypoint is intended to change scheduling, not transcript quality; whether it saves time depends on the workload and hardware. The repository is BSD-2-Clause, but dependencies and model weights should be reviewed separately before redistribution.

Hardware & Deployment Guide

Target Python 3.10 or newer, with FFmpeg and Cython installed before running pip install -c constraints.txt -r requirements.txt. Python 3.9 is possible with manual dependency installation but is not the straightforward setup path. Start with python diarize.py -a AUDIO_FILE_NAME. Installation pulls several packages from Git, so plan to stage dependencies and model assets separately for an air-gapped deployment rather than assuming an offline installer.

Inference runs locally; no hosted speech API is required. Once the sequential path works on representative files, try diarize_parallel.py if the machine meets the stated 10 GB VRAM recommendation and throughput matters. No tagged release is listed, so record the tested repository commit and Python environment for repeatable deployment.

Pipeline: faster-whisper provides ASR; CTC forced alignment puts transcript words on a timeline that can be matched to NeMo speaker segments.
Speaker attribution: MarbleNet detects speech, TitaNet extracts speaker embeddings, and punctuation helps refine sentence boundaries around small timing offsets.
Audio preprocessing: Demucs vocal separation can be bypassed with --no-stem when the extra processing is not worthwhile.
Execution modes: diarize.py is the sequential entrypoint; experimental diarize_parallel.py runs Whisper and NeMo concurrently, with at least 10 GB of VRAM recommended.
Inference controls: The CLI defaults to medium.en and exposes model, language, device, numeral handling, and batching controls.
Dependency management: Installation uses constraints.txt; Demucs, deepmultilingualpunctuation, and ctc-forced-aligner are fetched from Git repositories.
Best For

Local batch processing of interviews, podcasts, and meetings where speakers usually take turns and transcripts need speaker labels.

Skip If

You need reliable attribution during crosstalk, a managed or real-time API, or configurable SRT sentence-length limits.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

CLIGPULocal AI
pip install cython

Comparison vs. Top Voice, Vision & Video Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
whisper-diarization ★5.7k+3Jupyter NotebookBSD-2-ClauseLocal Whisper and NeMo CLI for speaker-attributed transcripts
WhisperLiveKit11.3k+27PythonApache-2.0Self-hosted streaming speech-to-text with pluggable ASR and speaker diarization
speech-to-speech13.9k+137PythonApache-2.0A modular speech cascade for self-hosted voice agents over OpenAI Realtime
voice-pro13.5k+34PythonGPL-3.0Self-hosted Gradio studio for transcription, translation, and dubbing

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/MahmoudAshraf97/whisper-diarization.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

MahmoudAshraf97/whisper-diarization Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about whisper-diarization

What is the integration point, and how are words assigned to speakers?

Use diarize.py -a AUDIO_FILE_NAME as a file-processing step. Whisper supplies the text, CTC forced alignment supplies word timing, and NeMo supplies speaker segments. The pipeline assigns speaker labels by matching timestamps, then uses punctuation to refine sentence boundaries. The documented interface is a CLI, not a network API.

Is 10 GB of VRAM required, and what should I do if inference runs out of memory?

The experimental parallel entrypoint is recommended for systems with at least 10 GB of VRAM because it runs Whisper and NeMo concurrently. That figure is not a minimum for diarize.py. Start with the sequential path, reduce --batch-size under memory pressure, and set it to 0 to disable batched inference. Measure peak usage with the actual model and input files.

Can we self-host this commercially or include it in a distributed product?

BSD-2-Clause permits commercial use of the repository code, subject to its notice conditions when redistributing. Review the licenses and terms of the dependencies and model weights separately, particularly if you bundle them. Local processing also does not replace consent, retention, and access controls for recorded speech.

When is this a better choice than plain Whisper, a custom diarization pipeline, or a managed API?

Choose this over Whisper alone when the transcript needs to identify who spoke. Compared with assembling Whisper and a separate diarization pipeline such as pyannote.audio, it already supplies the timing and sentence-level integration. Compared with a managed speech API, it offers local execution but leaves dependency maintenance, hardware sizing, and quality validation to you. Test representative recordings rather than assuming an accuracy advantage.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining MahmoudAshraf97/whisper-diarization? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature MahmoudAshraf97/whisper-diarization on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare