Skip to content

Commit 60089d1

Browse files
committed
add nr result note and correct python sample code error
1 parent 48139f7 commit 60089d1

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ 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+
> [!NOTE]
112+
> If speaker identification or differentiate is enabled, even you have received `Transcribed` results, service is still evaluating them by accumulated audio information. When service finds any previous result assigned a wrong `UserId`, it will send out an almost same `Transcribed` result again, but 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 current `Transcribed` result is going to correct previous one. Your client or UI logic could decide behaviors, like overwriting previous output, or just ignore the current one.
113+
111114
Call the function `TranscribeConversationsAsync()` to start conversation transcription.
112115

113116
```csharp

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ 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+
> [!NOTE]
78+
> If speaker identification or differentiate is enabled, even you have received `transcribed` results, service is still evaluating them by accumulated audio information. When service finds any previous result assigned a wrong `speakerId`, it will send out an almost same `transcribed` result again, but 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 current `transcribed` result is going to correct previous one. Your client or UI logic could decide behaviors, like overwriting previous output, or just ignore the current one.
79+
7780
```javascript
7881
(function() {
7982
"use strict";

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ 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+
> [!NOTE]
79+
> If speaker identification or differentiate is enabled, even you have received `transcribed` results, service is still evaluating them by accumulated audio information. When service finds any previous result assigned a wrong `speakerId`, it will send out an almost same `transcribed` result again, but 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 current `transcribed` result is going to correct previous one. Your client or UI logic could decide behaviors, like overwriting previous output, or just ignore the current one.
80+
7881
```python
7982
import azure.cognitiveservices.speech as speechsdk
8083
import time
@@ -123,8 +126,8 @@ def conversation_transcription_differentiate_speakers():
123126
user1 = speechsdk.transcription.Participant("[email protected]", "en-us", voice_signature_user1)
124127
user2 = speechsdk.transcription.Participant("[email protected]", "en-us", voice_signature_user2)
125128

126-
conversation.add_participant_async(user1)
127-
conversation.add_participant_async(user2)
129+
conversation.add_participant_async(user1).get()
130+
conversation.add_participant_async(user2).get()
128131
transcriber.join_conversation_async(conversation).get()
129132
transcriber.start_transcribing_async()
130133

0 commit comments

Comments
 (0)