DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to label who said what with diarization with whisperX

Run WhisperX with diarization on a multi-speaker recording using a larger model.

Short answer: Generate a Hugging Face read token and accept the user agreement for the speaker-diarization-community-1 model; then 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. All steps.

  • Content
  • Intermediate
  • 30 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

Credentials. Diarization needs your Hugging Face token; pass it from the environment and never commit it.

Who it is forA journalist or analyst with a two-person interview.

The problemRaw transcripts do not say who is speaking.

The outcomeA transcript where each segment carries a speaker ID.

What you need first

  • 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

Steps

  1. Generate a Hugging Face read token and accept the user agreement for the speaker-diarization-community-1 model
  2. Run whisperx path/to/audio.wav --model large-v2 --diarize --highlight_words True adding your token with the --hf_token argument
  3. Set --min_speakers 2 and --max_speakers 2 if you know the speaker count
  4. Review the labeled output and fix any mislabeled turns

Prompt for your agent

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.

Caveat. Overlapping speech is not handled well and diarization is far from perfect.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for m-bain/whisperX and "Label who said what with diarization"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer