Skip to content

Commit 915a3cd

Browse files
committed
update cts doc for differentiate speaker property
1 parent 40c8276 commit 915a3cd

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

articles/cognitive-services/Speech-Service/conversation-transcription.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This is a high-level overview of how Conversation Transcription works.
5353
- **User voice samples** – Conversation Transcription needs user profiles in advance of the conversation. You will need to collect audio recordings from each user, then send the recordings to the [Signature Generation Service](https://aka.ms/cts/signaturegenservice) to validate the audio and generate user profiles.
5454

5555
> [!NOTE]
56-
> User voice samples are optional. Without this input, the transcription will show different speakers, but shown as "Speaker1", "Speaker2", etc. instead of recognizing as pre-enrolled specific speaker names.
56+
> User voice samples are optional. Without voice input but have `DifferentiateGuestSpeakers` enabled, the transcription will still show different speakers, but shown as "Speaker1", "Speaker2", etc. instead of recognizing as pre-enrolled specific speaker names. For more information about setting `DifferentiateGuestSpeakers`, please refer to sample codes in [Real-Time Conversation Transcription Quickstart](.\includes\how-to\conversation-transcription\real-time-csharp.md).
5757
5858

5959
## Real-time vs. asynchronous

articles/cognitive-services/Speech-Service/includes/how-to/conversation-transcription/real-time-csharp.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ This sample code does the following:
105105
* Creates an `AudioConfig` from the sample `.wav` file to transcribe.
106106
* Creates a `Conversation` using `CreateConversationAsync()`.
107107
* Creates a `ConversationTranscriber` using the constructor, and subscribes to the necessary events.
108+
* Enables `DifferentiateGuestSpeakers` feature to show the different speakers.
108109
* Adds participants to the conversation. The strings `voiceSignatureStringUser1` and `voiceSignatureStringUser2` should come as output from the steps above from the function `GetVoiceSignatureString()`.
109110
* Joins the conversation and begins transcription.
110111

@@ -133,7 +134,12 @@ public static async Task TranscribeConversationsAsync(string voiceSignatureStrin
133134

134135
var config = SpeechConfig.FromSubscription(subscriptionKey, region);
135136
config.SetProperty("ConversationTranscriptionInRoomAndOnline", "true");
136-
// config.SpeechRecognitionLanguage = "zh-cn"; // en-us by default. This code specifies Chinese.
137+
138+
// This will enable "differentiate speakers" feature. You could comment it if you want to disable the feature.
139+
config.SetProperty("DifferentiateGuestSpeakers", "true");
140+
141+
// en-us by default. This code specifies Chinese.
142+
// config.SpeechRecognitionLanguage = "zh-cn";
137143
var stopRecognition = new TaskCompletionSource<int>();
138144

139145
using (var audioInput = AudioConfig.FromWavFileInput(filepath))

articles/cognitive-services/Speech-Service/includes/how-to/conversation-transcription/real-time-javascript.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ This sample code does the following:
9393

9494
var speechTranslationConfig = sdk.SpeechTranslationConfig.fromSubscription(subscriptionKey, region);
9595
var audioConfig = sdk.AudioConfig.fromStreamInput(pushStream);
96+
speechTranslationConfig.setProperty("ConversationTranscriptionInRoomAndOnline", "true");
97+
98+
// This will enable "differentiate speakers" feature. You could comment it if you want to disable the feature.
99+
speechTranslationConfig.setProperty("DifferentiateGuestSpeakers", "true");
100+
96101
speechTranslationConfig.speechRecognitionLanguage = "en-US";
97102

98103
// create conversation and transcriber

0 commit comments

Comments
 (0)