Skip to content

Commit

Permalink
Resolved PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BalajiUmmadisetti committed Dec 12, 2024
1 parent 5ff97cc commit fddac20
Show file tree
Hide file tree
Showing 4 changed files with 13,617 additions and 18 deletions.
2 changes: 1 addition & 1 deletion callautomation-live-transcription/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Open the `.env` file to configure the following settings

### Run app locally

1. Open a new Powershell window, cd into the `callautomation-az-openai-voice` folder and run `npm run dev`
1. Open a new Powershell window, cd into the `callautomation-live-transcription` folder and run `npm run dev`
2. Browser should pop up with the below page. If not navigate it to `http://localhost:8080/`
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).

Expand Down
15 changes: 2 additions & 13 deletions callautomation-live-transcription/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,8 @@ app.post("/api/incomingCall", async (req: any, res: any) => {

console.log(`Cognitive service endpoint: ${process.env.COGNITIVE_SERVICE_ENDPOINT.trim()}`);
const callIntelligenceOptions: CallIntelligenceOptions = { cognitiveServicesEndpoint: process.env.COGNITIVE_SERVICE_ENDPOINT.trim() };
const transcriptionOptions: TranscriptionOptions =
{
transportUrl: websocketUrl,
transportType: transportType,
locale: locale,
startTranscription: false
}
const answerCallOptions: AnswerCallOptions =
{
callIntelligenceOptions: callIntelligenceOptions,
transcriptionOptions: transcriptionOptions

};
const transcriptionOptions: TranscriptionOptions = { transportUrl: websocketUrl, transportType: transportType, locale: locale, startTranscription: false }
const answerCallOptions: AnswerCallOptions = { callIntelligenceOptions: callIntelligenceOptions, transcriptionOptions: transcriptionOptions};
console.log(`TranscriptionOption:" ${JSON.stringify(transcriptionOptions)}`);
answerCallResult = await acsClient.answerCall(incomingCallContext, callbackUri, answerCallOptions);
callConnection = answerCallResult.callConnection;
Expand Down
Loading

0 comments on commit fddac20

Please sign in to comment.