Skip to content

Commit 219d6b9

Browse files
Revert "Resolved PR comments"
This reverts commit fddac20.
1 parent fddac20 commit 219d6b9

File tree

4 files changed

+18
-13617
lines changed

4 files changed

+18
-13617
lines changed

callautomation-live-transcription/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Open the `.env` file to configure the following settings
5454

5555
### Run app locally
5656

57-
1. Open a new Powershell window, cd into the `callautomation-live-transcription` folder and run `npm run dev`
57+
1. Open a new Powershell window, cd into the `callautomation-az-openai-voice` folder and run `npm run dev`
5858
2. Browser should pop up with the below page. If not navigate it to `http://localhost:8080/`
5959
3. Register an EventGrid Webhook for the IncomingCall Event that points to your DevTunnel URI endpoint ex `{CALLBACK_HOST_URI}/api/incomingCall` and register Recording File Status Updated event to you recordingstatus api endpoint ex. `{CALLBACK_HOST_URI}/api/recordingFileStatus`. Instructions [here](https://learn.microsoft.com/en-us/azure/communication-services/concepts/call-automation/incoming-call-notification).
6060

callautomation-live-transcription/src/app.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,19 @@ app.post("/api/incomingCall", async (req: any, res: any) => {
8989

9090
console.log(`Cognitive service endpoint: ${process.env.COGNITIVE_SERVICE_ENDPOINT.trim()}`);
9191
const callIntelligenceOptions: CallIntelligenceOptions = { cognitiveServicesEndpoint: process.env.COGNITIVE_SERVICE_ENDPOINT.trim() };
92-
const transcriptionOptions: TranscriptionOptions = { transportUrl: websocketUrl, transportType: transportType, locale: locale, startTranscription: false }
93-
const answerCallOptions: AnswerCallOptions = { callIntelligenceOptions: callIntelligenceOptions, transcriptionOptions: transcriptionOptions};
92+
const transcriptionOptions: TranscriptionOptions =
93+
{
94+
transportUrl: websocketUrl,
95+
transportType: transportType,
96+
locale: locale,
97+
startTranscription: false
98+
}
99+
const answerCallOptions: AnswerCallOptions =
100+
{
101+
callIntelligenceOptions: callIntelligenceOptions,
102+
transcriptionOptions: transcriptionOptions
103+
104+
};
94105
console.log(`TranscriptionOption:" ${JSON.stringify(transcriptionOptions)}`);
95106
answerCallResult = await acsClient.answerCall(incomingCallContext, callbackUri, answerCallOptions);
96107
callConnection = answerCallResult.callConnection;

0 commit comments

Comments
 (0)