Skip to content

Commit 9142116

Browse files
authored
Update real-time-transcription-java.md
add SpeechRecognitionEndpointId
1 parent 68a4092 commit 9142116

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ TranscriptionOptions transcriptionOptions = new TranscriptionOptions(
2424
appConfig.getWebSocketUrl(),
2525
TranscriptionTransport.WEBSOCKET,
2626
"en-US",
27-
false
27+
false,
28+
"your-endpoint-id-here" // speechRecognitionEndpointId
2829
);
2930

3031
CreateCallOptions createCallOptions = new CreateCallOptions(callInvite, appConfig.getCallBackUri());
@@ -43,7 +44,8 @@ TranscriptionOptions transcriptionOptions = new TranscriptionOptions(
4344
appConfig.getWebSocketUrl(),
4445
TranscriptionTransport.WEBSOCKET,
4546
"en-US",
46-
false
47+
false,
48+
"your-endpoint-id-here" // speechRecognitionEndpointId
4749
);
4850

4951
ConnectCallOptions connectCallOptions = new ConnectCallOptions(new RoomCallLocator("roomId"), appConfig.getCallBackUri())
@@ -223,9 +225,14 @@ public class WebSocketServer {
223225
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.
224226

225227
```java
228+
UpdateTranscriptionOptions transcriptionOptions = new UpdateTranscriptionOptions()
229+
.setLocale(newLocale)
230+
.setOperationContext("transcriptionContext")
231+
.setSpeechRecognitionEndpointId("your-endpoint-id-here");
232+
226233
client.getCallConnection(callConnectionId)
227234
.getCallMedia()
228-
.updateTranscription("en-US-NancyNeural");
235+
.updateTranscriptionWithResponse(transcriptionOptions, Context.NONE);
229236
```
230237

231238
## Stop Transcription

0 commit comments

Comments
 (0)