{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "m-bain-whisperx--label-speakers-in-a-recording-with-whisperx",
 "repo": "m-bain/whisperX",
 "repo_url": "https://github.com/m-bain/whisperX",
 "repo_slug": "m-bain-whisperx",
 "title": "Label who said what with diarization",
 "page_title": "How to label who said what with diarization with whisperX",
 "summary": "Run WhisperX with diarization on a multi-speaker recording using a larger model.",
 "who": "A journalist or analyst with a two-person interview.",
 "problem": "Raw transcripts do not say who is speaking.",
 "outcome": "A transcript where each segment carries a speaker ID.",
 "steps": [
  "Generate a Hugging Face read token and accept the user agreement for the speaker-diarization-community-1 model",
  "Run `whisperx path/to/audio.wav --model large-v2 --diarize --highlight_words True` adding your token with the `--hf_token` argument",
  "Set `--min_speakers 2` and `--max_speakers 2` if you know the speaker count",
  "Review the labeled output and fix any mislabeled turns"
 ],
 "agent_prompt": "With m-bain/whisperX, run `whisperx <my audio file> --model large-v2 --diarize --highlight_words True --min_speakers 2 --max_speakers 2` using my Hugging Face token from the environment, and show the first 20 labeled lines.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Overlapping speech is not handled well and diarization is far from perfect.",
 "category": "Content",
 "tags": [
  "Content"
 ],
 "lang": "python",
 "requirements": [
  "Python with pip, ffmpeg may also be needed",
  "A GPU with CUDA toolkit 12.8 for speed, CPU also works",
  "A Hugging Face read token for speaker diarization"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "Diarization needs your Hugging Face token; pass it from the environment and never commit it."
  }
 ],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/m-bain-whisperx/label-speakers-in-a-recording-with-whisperx/",
 "md": "https://dedupedai.com/use-cases/m-bain-whisperx/label-speakers-in-a-recording-with-whisperx/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/m-bain-whisperx--label-speakers-in-a-recording-with-whisperx.json",
 "api_version": "v1"
}
