Skip to content

Commit b8d47ee

Browse files
committed
intermediate speaker ID
1 parent 2226dcb commit b8d47ee

File tree

1 file changed

+52
-8
lines changed
  • articles/ai-services/speech-service/includes/quickstarts/stt-diarization

1 file changed

+52
-8
lines changed

articles/ai-services/speech-service/includes/quickstarts/stt-diarization/csharp.md

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Follow these steps to create a console application and install the Speech SDK.
5858
var filepath = "katiesteve.wav";
5959
var speechConfig = SpeechConfig.FromSubscription(speechKey, speechRegion);
6060
speechConfig.SpeechRecognitionLanguage = "en-US";
61+
speechConfig.SetProperty(PropertyId.SpeechServiceResponse_DiarizeIntermediateResults, "true");
6162
6263
var stopRecognition = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
6364
@@ -69,7 +70,7 @@ Follow these steps to create a console application and install the Speech SDK.
6970
{
7071
conversationTranscriber.Transcribing += (s, e) =>
7172
{
72-
Console.WriteLine($"TRANSCRIBING: Text={e.Result.Text}");
73+
Console.WriteLine($"TRANSCRIBING: Text={e.Result.Text} Speaker ID={e.Result.SpeakerId}");
7374
};
7475
7576
conversationTranscriber.Transcribed += (s, e) =>
@@ -135,13 +136,56 @@ Follow these steps to create a console application and install the Speech SDK.
135136
The transcribed conversation should be output as text:
136137

137138
```output
138-
TRANSCRIBED: Text=Good morning, Steve. Speaker ID=Unknown
139-
TRANSCRIBED: Text=Good morning. Katie. Speaker ID=Unknown
140-
TRANSCRIBED: Text=Have you tried the latest real time diarization in Microsoft Speech Service which can tell you who said what in real time? Speaker ID=Guest-1
141-
TRANSCRIBED: Text=Not yet. I've been using the batch transcription with diarization functionality, but it produces diarization result until whole audio get processed. Speaker ID=Guest-2
142-
TRANSCRIBED: Text=Is the new feature can diarize in real time? Speaker ID=Guest-2
143-
TRANSCRIBED: Text=Absolutely. Speaker ID=GUEST-1
144-
TRANSCRIBED: Text=That's exciting. Let me try it right now. Speaker ID=GUEST-2
139+
TRANSCRIBING: Text=good morning steve Speaker ID=Unknown
140+
TRANSCRIBING: Text=good morning steve good Speaker ID=Guest-1
141+
TRANSCRIBING: Text=have you tried the latest real time diar Speaker ID=Guest-1
142+
TRANSCRIBING: Text=have you tried the latest real time diarization in Speaker ID=Guest-1
143+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft Speaker ID=Guest-1
144+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service Speaker ID=Guest-1
145+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which Speaker ID=Guest-1
146+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which can tell Speaker ID=Guest-1
147+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which can tell you Speaker ID=Guest-1
148+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which can tell you who Speaker ID=Guest-1
149+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which can tell you who said Speaker ID=Guest-1
150+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which can tell you who said what Speaker ID=Guest-1
151+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which can tell you who said what in Speaker ID=Guest-1
152+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which can tell you who said what in real Speaker ID=Guest-1
153+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which can tell you who said what in real time Speaker ID=Guest-1
154+
TRANSCRIBING: Text=have you tried the latest real time diarization in microsoft speech service which can tell you who said what in real time not yet Speaker ID=Guest-1
155+
TRANSCRIBING: Text=not yet i Speaker ID=Unknown
156+
TRANSCRIBING: Text=not yet i've been using Speaker ID=Unknown
157+
TRANSCRIBING: Text=not yet i've been using the Speaker ID=Guest-2
158+
TRANSCRIBING: Text=not yet i've been using the batch Speaker ID=Guest-2
159+
TRANSCRIBING: Text=not yet i've been using the batch transcri Speaker ID=Guest-2
160+
TRANSCRIBING: Text=not yet i've been using the batch transcription with Speaker ID=Guest-2
161+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization Speaker ID=Guest-2
162+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization function Speaker ID=Guest-2
163+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality Speaker ID=Guest-2
164+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but Speaker ID=Guest-2
165+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces Speaker ID=Guest-2
166+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization Speaker ID=Guest-2
167+
TRANSCRIBING: Text=good morning steve Speaker ID=Unknown
168+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until Speaker ID=Guest-2
169+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until whole Speaker ID=Guest-2
170+
TRANSCRIBING: Text=good morning steve Speaker ID=Unknown
171+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until whole audio get processed Speaker ID=Guest-2
172+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until whole audio get processed is Speaker ID=Guest-2
173+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until whole audio get processed is the new Speaker ID=Guest-2
174+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until whole audio get processed is the new feature Speaker ID=Guest-2
175+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until whole audio get processed is the new feature can Speaker ID=Guest-2
176+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until whole audio get processed is the new feature can diarize Speaker ID=Guest-2
177+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until whole audio get processed is the new feature can diarize in real Speaker ID=Guest-2
178+
TRANSCRIBING: Text=not yet i've been using the batch transcription with diarization functionality but it produces diarization result until whole audio get processed is the new feature can diarize in real time Speaker ID=Guest-2
179+
TRANSCRIBED: Text=Good morning, Steve. Good morning, Katie. Have you tried the latest real time diarization in Microsoft Speech Service, which can tell you who said what in real time? Speaker ID=Guest-1
180+
TRANSCRIBING: Text=absolutely Speaker ID=Unknown
181+
TRANSCRIBING: Text=absolutely that Speaker ID=Unknown
182+
TRANSCRIBING: Text=absolutely that's exc Speaker ID=Guest-1
183+
TRANSCRIBING: Text=that's exciting Speaker ID=Unknown
184+
TRANSCRIBING: Text=that's exciting let me Speaker ID=Unknown
185+
TRANSCRIBING: Text=that's exciting let me try it right now Speaker ID=Guest-2
186+
TRANSCRIBED: Text=Not yet. I've been using the batch transcription with diarization functionality, but it produces diarization result until whole audio get processed. Is the new feature can diarize in real time? Speaker ID=Guest-1
187+
TRANSCRIBED: Text=Absolutely. Speaker ID=Guest-1
188+
TRANSCRIBED: Text=That's exciting. Let me try it right now. Speaker ID=Guest-2
145189
CANCELED: Reason=EndOfStream
146190
```
147191

0 commit comments

Comments
 (0)