Diarized Transcription
Record a conversation and get a transcript that says who said what, using NVIDIA's Nemotron-3 Diarization and Whisper
What it is
Diarized Transcription records a conversation from the microphone and prints a transcript that says who said what. NVIDIA’s Nemotron-3 Diarization model works out who is speaking at each moment, OpenAI’s Whisper large-v3-turbo transcribes the audio, and each line is matched to a speaker. Afterwards you can give the speakers names.
[ 6.82s - 9.20s] Chris: I'm Chris, the Nemotron voice from NVIDIA.
[ 9.24s - 13.62s] Jane: Hi, everybody. Thanks for having me.
It handles up to 8 speakers, including overlapping speech, and can also transcribe any audio or video file ffmpeg can read.
How it works
- Diarization. For every short frame of audio, Nemotron-3 outputs the probability that each of 8 speaker slots is talking. A speaker counts as active when that probability passes a threshold (0.5 by default).
- Transcription. Whisper returns the text in timestamped chunks.
- Attribution. Each chunk goes to the speaker with the highest average activity over that chunk’s time span. Chunks where nobody passes the threshold are labeled
Unknown.
How it’s built
- Audio sources. An abstract
AudioSourcewith two implementations:MicrophoneSource, which calibrates to background noise and stops after a pause, andFileSource, which decodes files through ffmpeg. Both return 16 kHz mono audio, so a new input such as a network stream only needs aread()method. - Models.
SpeakerDiarizerwraps Nemotron-3 andTranscriberwraps Whisper, loaded on first use. Both run on the GPU when one is available and fall back to the CPU. - Transcript.
SegmentandTranscripthandle attribution, relabeling and printing, andDiarizationAppties the pieces together.
Key decisions
Two models instead of one. Diarization and transcription are separate problems with separate strengths. Joining them on timestamps keeps each model swappable and the attribution step simple to reason about.
Average activity over each chunk. Assigning a chunk to the speaker active at its start or midpoint breaks on quick turn-taking. Averaging activity across the whole span picks the dominant speaker and copes with short overlaps.
Naming speakers after the fact. The diarizer only knows “Speaker 0” and “Speaker 1”. Showing each speaker’s first line and asking for a name is a cheap way to turn anonymous slots into a readable transcript.
Tradeoffs
- Attribution is per chunk, not per word. If two people speak inside one Whisper chunk, the whole chunk goes to one of them.
- A GPU is strongly recommended. Both models run on the CPU, but slowly, and the first run downloads about 2 GB of weights.
- Terminal only. It records one conversation at a time and has no live, streaming mode yet.