r/Python • u/Gr1zzly8ear • Mar 16 '26
Showcase i built a Python library that tells you who said what in any audio file
What My Project Does
voicetag is a Python library that identifies speakers in audio files and transcribes what each person said. You enroll speakers with a few seconds of their voice, then point it at any recording — it figures out who's talking, when, and what they said.
from voicetag import VoiceTag
vt = VoiceTag()
vt.enroll("Christie", ["christie1.flac", "christie2.flac"])
vt.enroll("Mark", ["mark1.flac", "mark2.flac"])
transcript = vt.transcribe("audiobook.flac", provider="whisper")
for seg in transcript.segments:
print(f"[{seg.speaker}] {seg.text}")Output:
[Christie] Gentlemen, he sat in a hoarse voice. Give me your
[Christie] word of honor that this horrible secret shall remain buried amongst ourselves.
[Christie] The two men drew back.Under the hood it combines pyannote.audio for diarization with resemblyzer for speaker embeddings. Transcription supports 5 backends: local Whisper, OpenAI, Groq, Deepgram, and Fireworks — you just pick one.
It also ships with a CLI:
voicetag enroll "Christie" sample1.flac sample2.flac
voicetag transcribe recording.flac --provider whisper --language enEverything is typed with Pydantic v2 models, results are serializable, and it works with any spoken language since matching is based on voice embeddings not speech content.
Source code: https://github.com/Gr122lyBr/voicetag Install: pip install voicetag
Target Audience
Anyone working with audio recordings who needs to know who said what — podcasters, journalists, researchers, developers building meeting tools, legal/court transcription, call center analytics. It's production-ready with 97 tests, CI/CD, type hints everywhere, and proper error handling.
I built it because I kept dealing with recorded meetings and interviews where existing tools would give me either "SPEAKER_00 / SPEAKER_01" labels with no names, or transcription with no speaker attribution. I wanted both in one call.
Comparison
- pyannote.audio alone: Great diarization but only gives anonymous speaker labels (SPEAKER_00, SPEAKER_01). No name matching, no transcription. You have to build the rest yourself. voicetag wraps pyannote and adds named identification + transcription on top.
- WhisperX: Does diarization + transcription but no named speaker identification. You still get anonymous labels. Also no enrollment/profile system.
- Manual pipeline (wiring pyannote + resemblyzer + whisper yourself): Works but it's ~100 lines of boilerplate every time. voicetag is 3 lines. It also handles parallel processing, overlap detection, and profile persistence.
- Cloud services (Deepgram, AssemblyAI): They do speaker diarization but with anonymous labels. voicetag lets you enroll known speakers so you get actual names. Plus it runs locally if you want — no audio leaves your machine.