Building a Portuguese (PT-BR) Audio & Video Transcription Pipeline with Whisper Large-v3, Pyannote Speaker Diarization, and MCP
说明与用途
构建了一个使用 Whisper Large‑v3 和 Pyannote 进行说话人分离的巴西葡萄牙语音频和视频转录管道,支持 WhatsApp 语音笔记和字幕生成,并通过 MCP 与 AI 编码助手集成。
问题
Transcribing multi-speaker audio and video in Brazilian Portuguese faces challenges such as regional accents, colloquial expressions, overlapping speech, and low-bitrate voice notes (e.g., .opus/.ogg from WhatsApp).
结果
The pipeline delivers accurate, speaker-labeled Portuguese transcripts and subtitle files, handles low-bitrate WhatsApp voice notes, and integrates with AI coding assistants via MCP.
工作流
- 1. Run Whisper Large‑v3 to generate Portuguese text with word-level alignment.
- 2. Apply Pyannote speaker diarization to compute speaker embeddings, cluster speaker turns, and align each Whisper word timestamp with the active speaker cluster.
- 3. Format timestamps into SRT format using a helper function.
- 4. For WhatsApp audio, normalize sample rates on the fly and output clean paragraphs or speaker-labeled dialogue.
- 5. For video subtitles, segment lines by character‑per‑second reading speed and export .srt and .vtt files.
- 6. Expose the workflow to AI coding assistants by running the transcreva‑mcp server via MCP configuration.
证据
Transcribing multi-speaker audio and video in Brazilian Portuguese (PT-BR) comes with unique acoustic challenges: regional accents, colloquial expressions, overlapping speech in interviews, and low-bitrate voice notes (such as .opus / .ogg files from WhatsApp).
When you run standard speech-to-text on a 45-minute podcast or academic interview, a wall of unsegmented text is hard to read. To produce dialogue-ready transcripts with Speaker 1, Speaker 2 labels and word-level timestamps, we combine two stages: ASR with Whisper Large-v3 and Speaker Diarization with Pyannote.
Two of the most common real-world workflows for Brazilian journalists, researchers, and creators are: WhatsApp Audio Transcription and Automatic Subtitle Generation.
To bring transcription utilities directly into AI coding assistants (Cursor, Claude Desktop, Windsurf), we also built an open-source Model Context Protocol server: transcreva-mcp.
- 记录日期: 2026-11-04T04:14:06.734Z