Skip to content

Commit c310695

Browse files
authored
Update real-time-transcription-csharp.md
add speechrecognitionendpointid
1 parent bd33207 commit c310695

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

articles/communication-services/how-tos/call-automation/includes/real-time-transcription-csharp.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ StartTranscriptionOptions options = new StartTranscriptionOptions()
5757
{
5858
OperationContext = "startMediaStreamingContext",
5959
//Locale = "en-US",
60+
//Only add the SpeechRecognitionModelEndpointId if you have a custom speech model you would like to use
61+
SpeechRecognitionModelEndpointId = "YourCustomSpeechRecognitionModelEndpointId"
6062
};
6163

6264
await callMedia.StartTranscriptionAsync(options);
@@ -227,7 +229,14 @@ namespace WebServerApi
227229
For situations where your application allows users to select their preferred language you may also want to capture the transcription in that language. To do this, Call Automation SDK allows you to update the transcription locale.
228230

229231
```csharp
230-
await callMedia.UpdateTranscriptionAsync("en-US-NancyNeural");
232+
UpdateTranscriptionOptions updateTranscriptionOptions = new UpdateTranscriptionOptions(locale)
233+
{
234+
OperationContext = "UpdateTranscriptionContext",
235+
//Only add the SpeechRecognitionModelEndpointId if you have a custom speech model you would like to use
236+
SpeechRecognitionModelEndpointId = "YourCustomSpeechRecognitionModelEndpointId"
237+
};
238+
239+
await client.GetCallConnection(callConnectionId).GetCallMedia().UpdateTranscriptionAsync(updateTranscriptionOptions);
231240
```
232241

233242
## Stop Transcription

0 commit comments

Comments
 (0)