How do I transcribe audio with WhisperX on a cloud GPU?

Cover: Transcribe with WhisperX on a cloud GPU, pip install whisperx, --diarize --hf_token

Deploy a Raw GPU instance, run pip install whisperx in a Python 3.10–3.13 virtual environment, upload your audio, and run whisperx audio.mp3 --model large-v3 --output_format srt inside tmux; add --diarize --hf_token <token> after you accept the terms of the pyannote/speaker-diarization-community-1 model on Hugging Face to get speaker labels, then copy the output files off before you destroy the instance.

Updated 2026-10-30

This guide follows the WhisperX README and its command-line source (whisperx/__main__.py), the WhisperX package page on PyPI and the speaker-diarization-community-1 model card, all read on 2026-10-30. The latest WhisperX release that day was 3.8.6. It is for podcasters, video editors, researchers and anyone who needs word-timed transcripts or subtitles from long recordings on a rented NVIDIA GPU such as the RTX 5090 or the other cards listed on /pricing.

Only transcribe recordings you have the right to process, and treat transcripts of calls and interviews as personal data. WhisperX is under the BSD-2-Clause license; the diarization model is under CC-BY-4.0 according to its model card.

What you need

Item Official value (read 2026-10-30) Source
Install pip install whisperx (or uvx whisperx) WhisperX README
Python >=3.10, <3.14 PyPI metadata for whisperx 3.8.6
PyTorch torch~=2.8.0, torchaudio~=2.8.0 (installed as dependencies) PyPI metadata for whisperx 3.8.6
CUDA “install the CUDA toolkit 12.8 before WhisperX” for GPU use WhisperX README
GPU memory (official claim) “requires <8GB gpu memory for large-v2 with beam_size=5” WhisperX README, features list
Speaker labels a Hugging Face read token plus accepting the user agreement for pyannote/speaker-diarization-community-1 WhisperX README

The GPU memory line is the WhisperX project’s own statement for one model and setting, not a CloudGPU measurement. VRAM need depends on model, precision and workflow; see How much VRAM do I need to run an LLM? for the general method, and the VRAM of each card in the Performance table on /pricing (CloudGPU’s own listing).

Step 1: Deploy a Raw GPU and connect

On /deploy, pick an NVIDIA GPU and the Raw GPU option (JupyterLab + CUDA pre-installed, root SSH on a dedicated container). Connect over SSH with the host, port and user shown for your instance, or open a terminal in JupyterLab.

Step 2: Check the GPU and tools

nvidia-smi          # GPU name, driver version and the "CUDA Version" the driver supports
nvcc --version      # CUDA toolkit version, if installed
python3 --version   # WhisperX 3.8.6 needs 3.10 to 3.13
which ffmpeg tmux rsync

The WhisperX README asks for the CUDA toolkit 12.8, so compare the nvcc output and the “CUDA Version” in the nvidia-smi header with 12.8. If ffmpeg, tmux or rsync is missing, install it with apt (you are root on the container):

apt-get update && apt-get install -y ffmpeg tmux rsync

Step 3: Install WhisperX

Install into a virtual environment, inside tmux so the install keeps going if SSH disconnects:

tmux new -s whisperx
python3 -m venv ~/whisperx-env
source ~/whisperx-env/bin/activate
pip install -U pip
pip install whisperx

Then confirm that the PyTorch build pulled in by WhisperX sees your GPU:

python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available(), torch.cuda.get_device_name(0)); print(torch.cuda.get_arch_list())"

The line should print True and your GPU name. If it prints False, or a later step fails with a CUDA “no kernel image” error, the PyTorch wheel does not match the driver or the GPU; see How to install a specific PyTorch CUDA version on a cloud GPU and keep the torch~=2.8.0 version that WhisperX pins.

The README also lists an optional speed-up for the alignment step: pip install "whisperx[fast]" (installs Numba).

Step 4: Upload your audio

From your computer, copy the files into a folder on the instance:

rsync -avP -e "ssh -p <ssh-port>" ./recordings/ <ssh-user>@<ssh-host>:audio/

You can also upload through the JupyterLab file browser. WhisperX downloads its models from Hugging Face on first use; to manage that cache yourself, see How to download a Hugging Face model on a cloud GPU.

Step 5: Transcribe to subtitles

The WhisperX command line takes one or more audio files. Its default model is small and its default batch size is 8, so name the model you want. large-v3 and large-v2 are among the model names WhisperX accepts:

cd ~ && source ~/whisperx-env/bin/activate
mkdir -p out
whisperx audio/interview.mp3 --model large-v3 --compute_type float16 --output_dir out --output_format srt

--output_format accepts all, srt, vtt, txt, tsv, json and aud (default all). Set --language en (or another language code) if you know it; otherwise WhisperX detects it. Add --highlight_words True to mark word timings in the .srt file. The model files download on the first run and are cached for later runs on the same instance. Detach from tmux with Ctrl-b then d, and reattach with tmux attach -t whisperx.

Step 6: Add speaker labels (diarization)

  1. Sign in to Hugging Face, open the speaker-diarization-community-1 model page and accept its conditions (the page asks for contact details before it grants access).
  2. Create a token with read access under your Hugging Face settings.
  3. On the instance, put the token in an environment variable rather than in a file you might share:
read -s HF_TOKEN && export HF_TOKEN
whisperx audio/interview.mp3 --model large-v3 --diarize --hf_token "$HF_TOKEN" --min_speakers 2 --max_speakers 2 --output_dir out --output_format all

According to the README, setting --min_speakers and --max_speakers helps when you know the number of speakers. The README also says diarization “is far from perfect”, so check the labels on a short clip before you run a long batch.

Step 7: Use WhisperX from Python (optional)

The README’s Python example loads the model, transcribes, aligns and then assigns speakers. A shortened version:

import os, whisperx
from whisperx.diarize import DiarizationPipeline

device = "cuda"
audio = whisperx.load_audio("audio/interview.mp3")

model = whisperx.load_model("large-v3", device, compute_type="float16")
result = model.transcribe(audio, batch_size=8)

model_a, metadata = whisperx.load_align_model(language_code=result["language"], device=device)
result = whisperx.align(result["segments"], model_a, metadata, audio, device, return_char_alignments=False)

diarize_model = DiarizationPipeline(token=os.environ["HF_TOKEN"], device=device)
diarize_segments = diarize_model(audio)
result = whisperx.assign_word_speakers(diarize_segments, result)
print(result["segments"][:3])

Check the README for the current signatures if a call fails; this example follows the README as read on 2026-10-30.

Check your own setup

These are checks you can run yourself; this page does not assume the result.

  • PyTorch sees the GPU: the Step 3 check prints True and your GPU name.
  • WhisperX uses the GPU: while a transcription runs, nvidia-smi in a second SSH session lists a python process on the GPU. See How to check GPU utilization on a cloud GPU.
  • Files are written: ls out/ shows the .srt (and, with all, .vtt, .txt, .tsv and .json) files.

If WhisperX runs out of GPU memory

The WhisperX README lists three ways to reduce GPU memory use; the last two can affect quality:

  1. reduce the batch size, e.g. --batch_size 4
  2. use a smaller model, e.g. --model base
  3. use a lighter compute type, --compute_type int8

Otherwise, deploy a card with more VRAM from /pricing.

Before you destroy the instance

According to /terms, data on an instance is permanently deleted when the instance is destroyed. Copy your transcripts to your computer first:

rsync -avP -e "ssh -p <ssh-port>" <ssh-user>@<ssh-host>:out/ ./transcripts/

If you no longer need the Hugging Face token you used, revoke it in your Hugging Face settings. GPU time is billed per minute, rounded up, with a 1-minute minimum, and billing stops when you destroy the instance; see /terms.

FAQ

What Python version does WhisperX need?

WhisperX 3.8.6 on PyPI requires Python 3.10 or newer and older than 3.14 (read 2026-10-30). Check yours with python3 --version.

How do I get subtitles instead of plain text?

Add --output_format srt (or vtt) to the whisperx command; the files go to the folder given with --output_dir.

How do I get speaker labels with WhisperX?

Accept the conditions of pyannote/speaker-diarization-community-1 on Hugging Face, create a read token, and add --diarize --hf_token "$HF_TOKEN" to the command. Set --min_speakers and --max_speakers if you know the number of speakers.

What do I do if WhisperX runs out of GPU memory?

The WhisperX README suggests a smaller --batch_size, a smaller --model, or --compute_type int8; the last two can affect accuracy. You can also deploy a card with more VRAM from /pricing.

Will my transcripts stay on the instance after I destroy it?

No. Data on an instance is permanently deleted when the instance is destroyed, so copy the output folder to your computer first. Billing is per minute, rounded up, with a 1-minute minimum, and stops when you destroy the instance.

Sources