Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

transcribe

GPU-accelerated audio transcription with speaker diarization for NVIDIA DGX Spark.

Uses WhisperX (large-v3) via Docker with patches for Blackwell GB10 (sm_121) compatibility, based on the mekopa/whisperx-blackwell image.

Features

  • GPU-accelerated transcription via faster-whisper + CTranslate2
  • Word-level timestamps via Wav2Vec2 alignment
  • Speaker diarization via pyannote.audio (requires HuggingFace token)
  • Multiple output formats: txt, srt, vtt, tsv, json
  • Multi-file and glob support
  • Skips already-transcribed files

Requirements

  • NVIDIA DGX Spark (aarch64 + Blackwell GB10)
  • Docker with NVIDIA container runtime
  • HuggingFace token (for speaker diarization)

Install

cp transcribe ~/.local/bin/
chmod +x ~/.local/bin/transcribe

First run pulls the base image (~15 GB) and builds a thin CLI layer (one time).

Usage

transcribe [options] <audio_files...>

Options:
  -m, --model MODEL      Whisper model: tiny, base, small, medium, large-v3
                          (default: large-v3)
  -l, --language LANG    Language code: en, de, fr, es, etc. (default: auto-detect)
  -s, --speakers N       Number of speakers (improves diarization)
  -f, --force            Re-transcribe even if output already exists
  -h, --help             Show this help

Examples

# Basic transcription
transcribe recording.mp3

# Specify language (faster, skips detection pass)
transcribe -l en recording.mp3

# Batch transcribe all mp3s
transcribe -l en *.mp3

# With speaker count hint
transcribe -s 2 interview.wav

# Smaller model for faster results
transcribe -m medium lecture.mp3

Output goes to <audio_dir>/transcripts/ with all formats (txt, srt, vtt, tsv, json).

Speaker Diarization Setup

Diarization requires a HuggingFace token with access to gated models:

  1. Create a token at https://huggingface.co/settings/tokens
  2. Accept terms at:
  3. Add to ~/.env:
    HF_TOKEN=hf_xxxxxxxxxxxx
    

Without HF_TOKEN, transcription still works but without speaker labels.

Diagnostics

./transcribe-diagnose

Checks PyTorch CUDA, CTranslate2 GPU support, and faster-whisper model loading.

How It Works

The DGX Spark's Blackwell GB10 (sm_121) requires several patches for WhisperX compatibility:

  • Build-time (baked into base image): sm_121 -> sm_90 compute capability spoofing, torchaudio FFT jiterator bypass, CTranslate2 and torchaudio built from source
  • Runtime (applied by CLI wrapper): torch.load weights_only override, NVIDIA torch version string semver fix, torchaudio API shims, TF32 pre-disable, Lightning log level

See CLAUDE.md for full technical details.

About

audio transcription on DGX Spark

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages