Skip to content

Add support for speaker diarization in azure-transcribe#60

Merged
pragmatrix merged 5 commits into
masterfrom
azure-diarization
May 6, 2026
Merged

Add support for speaker diarization in azure-transcribe#60
pragmatrix merged 5 commits into
masterfrom
azure-diarization

Conversation

@pragmatrix
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds optional speaker attribution to text outputs so Azure Transcribe can emit speaker diarization results end-to-end (service → core output → server protocol → examples), while keeping the field absent for services that don’t provide diarization.

Changes:

  • Extend Output::Text / ConversationOutput::text() and ServerEvent::Text with an optional speaker field.
  • Add a diarization parameter to Azure Transcribe and plumb Azure’s speaker id into final text events.
  • Update downstream services/examples/recipes to the new output.text(..., speaker) signature and demonstrate the new flag.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/protocol.rs Adds optional speaker field to ServerEvent::Text payload.
src/context_switch.rs Propagates speaker from core Output::Text into ServerEvent::Text.
core/src/conversation.rs Extends Output::Text and ConversationOutput::text() to carry optional speaker.
services/azure/src/transcribe.rs Adds diarization param; enables speaker recognition; emits speaker id on final results.
services/azure/src/translate.rs Updates output.text() calls for new signature (also touches modality gating logic).
services/elevenlabs/src/transcribe.rs Updates output.text() calls for new signature.
services/openai-dialog/src/lib.rs Updates output.text() call for new signature.
services/aristech/src/transcribe.rs Updates output.text() call for new signature.
examples/azure-translate.rs Displays the new speaker field when printing text outputs.
examples/azure-transcribe.rs Adds --diarization CLI flag and passes it into Azure Transcribe params.
justfile Adds azure-transcribe-diarization recipe to run the example with diarization enabled.

Comment thread services/azure/src/translate.rs
Comment thread services/azure/src/translate.rs
@pragmatrix pragmatrix force-pushed the azure-diarization branch from 112326a to 572d8ad Compare May 6, 2026 07:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

@pragmatrix pragmatrix merged commit 5bef6f6 into master May 6, 2026
10 checks passed
@pragmatrix pragmatrix deleted the azure-diarization branch May 6, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants