Add support for speaker diarization in azure-transcribe#60
Merged
Conversation
bbb7eb3 to
112326a
Compare
Contributor
There was a problem hiding this comment.
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()andServerEvent::Textwith an optionalspeakerfield. - Add a
diarizationparameter 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. |
112326a to
572d8ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.