TL;DR
We'll turn a two-person video into a WebVTT caption file where each cue says who is speaking. Pipeline: ffmpeg extracts audio, whisperx --diarize transcribes and labels speakers, a small Python script groups words into <v Speaker> cues.
Plain speech-to-text gives you a wall of words. For interviews, podcasts and meetings, readers need to know who said what. We'll use WhisperX (Whisper with voice activity detection, forced alignment and pyannote-based diarization) and the standard WebVTT voice span so any player can show the names. #python #video
You'll need python 3.10+ , ffmpeg , a Hugging Face account, and ideally a CUDA GPU. CPU works with --compute_type int8 --device cpu , just slower.
1.…