# AI use cases for whisperX (m-bain/whisperX)

Repo: [m-bain/whisperX](https://github.com/m-bain/whisperX) | Use cases: 3 | Page: https://dedupedai.com/use-cases/m-bain-whisperx/

WhisperX is fast Whisper-based speech recognition with word-level timestamps via forced phoneme alignment and speaker diarization. It runs batched inference through a faster-whisper backend, ships a `whisperx` command line tool and a Python API, and can run on CPU or GPU.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Transcribe an audio file with word timings: https://dedupedai.com/use-cases/m-bain-whisperx/transcribe-an-audio-file-with-whisperx-cli/
- Label who said what with diarization: https://dedupedai.com/use-cases/m-bain-whisperx/label-speakers-in-a-recording-with-whisperx/
- Transcribe on a CPU-only laptop or Mac: https://dedupedai.com/use-cases/m-bain-whisperx/run-whisperx-on-a-laptop-cpu/

## How to transcribe an audio file with word timings with whisperX

Repo: [m-bain/whisperX](https://github.com/m-bain/whisperX) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Install WhisperX and run the whisperx command on a recording to get a timed transcript and subtitles.

**Who it is for:** Someone with an interview or meeting recording and no transcript.

**The problem:** Plain Whisper timestamps drift and manual syncing is slow.

**The outcome:** A transcript with accurate word-level timing.

### Steps

1. Install WhisperX with `pip install whisperx`
2. Run `whisperx path/to/audio.wav` to transcribe with default settings
3. Add `--highlight_words True` to see word timings in the .srt file
4. Open the output files and check the timing against the audio

### Prompt to paste into your agent

```text
Using m-bain/whisperX, install it with `pip install whisperx`, run `whisperx <my audio file> --highlight_words True`, then summarize what output files were created.
```

### Caveat

Words like 2014. or 13.60 pounds that lack alignment characters get no timing.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/m-bain-whisperx/transcribe-an-audio-file-with-whisperx-cli/

## How to label who said what with diarization with whisperX

Repo: [m-bain/whisperX](https://github.com/m-bain/whisperX) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

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

**Who it is for:** A journalist or analyst with a two-person interview.

**The problem:** Raw transcripts do not say who is speaking.

**The outcome:** A transcript where each segment carries a speaker ID.

### 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 to paste into your agent

```text
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.

Risk, credentials: Diarization needs your Hugging Face token; pass it from the environment and never commit it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/m-bain-whisperx/label-speakers-in-a-recording-with-whisperx/

## How to transcribe on a CPU-only laptop or Mac with whisperX

Repo: [m-bain/whisperX](https://github.com/m-bain/whisperX) | Difficulty: Beginner | Time: 20 minutes | Basis: From the README

Use int8 compute on CPU, and a smaller model if memory is tight.

**Who it is for:** A user without an NVIDIA GPU.

**The problem:** Default settings assume a GPU.

**The outcome:** A working transcript on ordinary hardware.

### Steps

1. Install with `pip install whisperx`
2. Run `whisperx path/to/audio.wav --compute_type int8 --device cpu`
3. If memory runs short, add `--model base`
4. Compare the result to a larger model on a short clip if quality matters

### Prompt to paste into your agent

```text
Using m-bain/whisperX, run `whisperx <my audio file> --compute_type int8 --device cpu` and if it fails for memory, retry with `--model base`.
```

### Caveat

CPU runs are far slower than the 70x realtime GPU figure and smaller models can reduce quality.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/m-bain-whisperx/run-whisperx-on-a-laptop-cpu/
