Skip to content

Commit 68e76cf

Browse files
Merge pull request #227519 from jimxiei/jimxie/update_cts_nr
[CTS] Add NR result note and correct python sample code error.
2 parents 0db6a1b + 80103a7 commit 68e76cf

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ This sample code does the following:
108108
> [!NOTE]
109109
> `AudioStreamReader` is a helper class you can get on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/quickstart/csharp/dotnet/conversation-transcription/helloworld/AudioStreamReader.cs).
110110
111+
If speaker identification or differentiate is enabled, then even if you have already received `Transcribed` results, the service is still evaluating them by accumulated audio information. If the service finds that any previous result was assigned an incorrect `UserId`, then a nearly identical `Transcribed` result will be sent again, where only the `UserId` and `UtteranceId` are different. Since the `UtteranceId` format is `{index}_{UserId}_{Offset}`, when you receive a `Transcribed` result, you could use `UtteranceId` to determine if the current `Transcribed` result is going to correct a previous one. Your client or UI logic could decide behaviors, like overwriting previous output, or to ignore the latest result.
112+
111113
Call the function `TranscribeConversationsAsync()` to start conversation transcription.
112114

113115
```csharp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ This sample code does the following:
7474
* Registers to events and begins transcription.
7575
* If you want to differentiate speakers without providing voice samples, please enable `DifferentiateGuestSpeakers` feature as in [Conversation Transcription Overview](../../../conversation-transcription.md).
7676

77+
If speaker identification or differentiate is enabled, then even if you have already received `transcribed` results, the service is still evaluating them by accumulated audio information. If the service finds that any previous result was assigned an incorrect `speakerId`, then a nearly identical `Transcribed` result will be sent again, where only the `speakerId` and `UtteranceId` are different. Since the `UtteranceId` format is `{index}_{speakerId}_{Offset}`, when you receive a `transcribed` result, you could use `UtteranceId` to determine if the current `transcribed` result is going to correct a previous one. Your client or UI logic could decide behaviors, like overwriting previous output, or to ignore the latest result.
78+
7779
```javascript
7880
(function() {
7981
"use strict";

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ This sample code does the following:
7575
* Read the whole wave files at once and stream it to sdk and begins transcription.
7676
* If you want to differentiate speakers without providing voice samples, please enable `DifferentiateGuestSpeakers` feature as in [Conversation Transcription Overview](../../../conversation-transcription.md).
7777

78+
If speaker identification or differentiate is enabled, then even if you have already received `transcribed` results, the service is still evaluating them by accumulated audio information. If the service finds that any previous result was assigned an incorrect `speakerId`, then a nearly identical `Transcribed` result will be sent again, where only the `speakerId` and `UtteranceId` are different. Since the `UtteranceId` format is `{index}_{speakerId}_{Offset}`, when you receive a `transcribed` result, you could use `UtteranceId` to determine if the current `transcribed` result is going to correct a previous one. Your client or UI logic could decide behaviors, like overwriting previous output, or to ignore the latest result.
79+
7880
```python
7981
import azure.cognitiveservices.speech as speechsdk
8082
import time
@@ -123,8 +125,8 @@ def conversation_transcription_differentiate_speakers():
123125
user1 = speechsdk.transcription.Participant("[email protected]", "en-us", voice_signature_user1)
124126
user2 = speechsdk.transcription.Participant("[email protected]", "en-us", voice_signature_user2)
125127

126-
conversation.add_participant_async(user1)
127-
conversation.add_participant_async(user2)
128+
conversation.add_participant_async(user1).get()
129+
conversation.add_participant_async(user2).get()
128130
transcriber.join_conversation_async(conversation).get()
129131
transcriber.start_transcribing_async()
130132

0 commit comments

Comments
 (0)