Skip to content

Commit dcdb131

Browse files
committed
edit pass: comm-services-samples-tutorials
1 parent ea28c3d commit dcdb131

9 files changed

+220
-210
lines changed

articles/communication-services/how-tos/call-automation/handle-events-with-event-processor.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ By using event processor features, you can easily build robust applications that
3131
The Call Automation event processor first needs to consume events that were sent from the service. After the event arrives at the callback endpoint, pass the event to the event processor.
3232

3333
> [!IMPORTANT]
34-
> Have you established a webhook callback events endpoint? The event processor still needs to consume callback events through a webhook callback. For information on how to establish webhook endpoints, see [Quickstart: Make an outbound call by using Call Automation](../../quickstarts/call-automation/quickstart-make-an-outbound-call.md).
34+
> Have you established a webhook callback events endpoint? The event processor still needs to consume callback events through a webhook callback. For information on how to establish webhook endpoints, see [Make an outbound call by using Call Automation](../../quickstarts/call-automation/quickstart-make-an-outbound-call.md).
3535
3636
```csharp
3737
using Azure.Communication.CallAutomation;
@@ -79,14 +79,14 @@ With the event processor, you can easily wait for the `CallConnected` event unti
7979
Now that the call is established, try to play some audio in the call, and then wait until the media plays.
8080

8181
```csharp
82-
// Play my prompt to everyone
82+
// Play my prompt to everyone.
8383
FileSource fileSource = new FileSource(playPrompt);
8484
PlayResult playResult = await callConnection.GetCallMedia().PlayToAllAsync(fileSource);
8585

86-
// Wait for play to complete
86+
// Wait for play to complete.
8787
PlayEventResult playEventResult = await playResult.WaitForEventProcessorAsync();
8888

89-
// Check if the play was completed successfully
89+
// Check if the play was completed successfully.
9090
if (playEventResult.IsSuccess)
9191
{
9292
// Success play!
@@ -100,7 +100,7 @@ else
100100
```
101101

102102
> [!WARNING]
103-
> The event processor uses `OperationContext` to track an event with its related request. If `OperationContext` wasn't set during the request, the event processor sets generated GUID to track future events to the request. If you set your own `OperationContext` during the request, the event processor still works, but we recommend that you set them differently from request to request. In this way, the event processor can distinguish the first request's event and the second request's event.
103+
> The event processor uses `OperationContext` to track an event with its related request. If `OperationContext` wasn't set during the request, the event processor sets generated GUID to track future events to the request. If you set `OperationContext` during the request, the event processor still works, but we recommend that you set them differently from request to request. In this way, the event processor can distinguish the first request's event and the second request's event.
104104
105105
## Handle events with the ongoing event processor
106106

@@ -117,7 +117,7 @@ eventProcessor.AttachOngoingEventProcessor<ParticipantsUpdated>(callConnectionId
117117
});
118118
```
119119

120-
With this specific ongoing event processor, you can now print the number or participants or the participants on the call whenever people join or leave the call.
120+
With this specific ongoing event processor, you can now print the number of participants or the participants on the call whenever people join or leave the call.
121121

122122
> [!TIP]
123123
> You can attach an ongoing handler to any event type. This capability opens the possibility to build your application with a callback design pattern.

articles/communication-services/samples/call-automation-ai.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Call Automation AI sample
2+
title: Call Automation AI Sample
33
titleSuffix: An Azure Communication Services sample overview
4-
description: Overview of Call Automation AI hero sample using Azure Communication Services to enable developers to learn how to incorporate AI into their workflows.
4+
description: This Call Automation AI hero sample that uses Azure Communication Services enables developers to learn how to incorporate AI into their workflows.
55
author: kpunjabi
66
manager: visho
77
services: azure-communication-services
@@ -16,11 +16,9 @@ zone_pivot_groups: acs-js-csharp-java-python
1616

1717
# Get started with the Azure Communication Services Call Automation OpenAI sample
1818

19-
The Azure Communication Services Call Automation OpenAI sample demonstrates how you can use Call Automation SDK and the recently announced public preview integration with Azure AI services to build intelligent virtual assistants.
20-
21-
22-
In this sample, we'll cover off what this sample does and what you need as pre-requisites before we run this sample locally on your machine.
19+
The Azure Communication Services Call Automation OpenAI sample demonstrates how you can use the Call Automation SDK and the recently announced public preview integration with Azure AI services to build intelligent virtual assistants.
2320

21+
In this article, we cover what this sample does and what you need as prerequisites before we run this sample locally on your machine.
2422

2523
::: zone pivot="programming-language-csharp"
2624
[!INCLUDE [Azure Communication Services Call Automation OpenAI C# sample](./includes/call-automation-ai-csharp.md)]

articles/communication-services/samples/call-automation-azure-openai-sample.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Call Automation AI sample
2+
title: Call Automation AI Sample
33
titleSuffix: An Azure Communication Services sample showing how to integrate with Azure OpenAI
4-
description: Overview of Call Automation sample using Azure Communication Services to enable developers to learn how to incorporate Azure OpenAI voice model into their workflows.
4+
description: This Call Automation sample that uses Azure Communication Services shows developers how to incorporate an Azure OpenAI voice model into their workflows.
55
author: kpunjabi
66
services: azure-communication-services
77
ms.author: kpunjabi
@@ -13,11 +13,11 @@ ms.custom: devx-track-extended-java, devx-track-js, devx-track-python, devx-trac
1313
zone_pivot_groups: acs-js-csharp
1414
---
1515

16-
# ACS Call Automation and Azure OpenAI Service
16+
# Call Automation and Azure OpenAI
1717

18-
This sample application was demonstrated during Microsoft Ignite 2024. It highlights an integration of Azure Communication Services with Azure OpenAI Service to enable intelligent conversational agents.
18+
This sample application was demonstrated during Microsoft Ignite 2024. It highlights the integration of Azure Communication Services with Azure OpenAI to enable intelligent conversational agents.
1919

20-
In this sample, we cover off what this sample does and what you need as prerequisites before we run this sample locally on your machine.
20+
In this article, we cover what this sample does and what you need as prerequisites before we run the sample locally on your machine.
2121

2222
::: zone pivot="programming-language-csharp"
2323
[!INCLUDE [Azure Communication Services Call Automation Azure OpenAI C# sample](./includes/call-automation-azure-openai-csharp.md)]
Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: include file
3-
description: include file
2+
title: Include file
3+
description: Include file
44
services: azure-communication-services
55
manager: visho
66
ms.service: azure-communication-services
@@ -11,32 +11,32 @@ ms.custom: include file
1111
ms.author: kpunjabi
1212
---
1313

14-
## Download code
15-
Find the project for this sample on [GitHub](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/tree/main/callautomation-openai-sample-csharp). You can download this code and run it locally to try it for yourself.
14+
## Download code
1615

17-
## Overview
16+
Find the project for this sample on [GitHub](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/tree/main/callautomation-openai-sample-csharp). You can download this code and run it locally to try it for yourself.
1817

19-
This sample is a server-side application that helps you create a virtual assistant capable of handling calls using Call Automation and responding to customers using the newly announced integration with Azure AI services to provide AI capabilities such as Text-to-Speech and Speech-to-Text along with smart responses provided by Azure OpenAI.
18+
## Overview
2019

21-
This Azure Communication Services Call Automation AI sample demonstrates how to use the Call Automation SDK to answer an inbound call, recognizes user voice input using Call Automation recognize API with support for Speech-to-Text. Once input is recognized, it sends that information to OpenAI for an answer and plays the answer provided back by OpenAI to the caller using Call Automation play API with support for Text-to-Speech.
20+
This sample is a server-side application that helps you create a virtual assistant that can handle calls by using Call Automation. The virtual assistant responds to customers by using the newly announced integration with Azure AI services to provide AI capabilities such as text to speech and speech to text, along with smart responses provided by Azure OpenAI.
2221

23-
## Prerequisites
22+
This Azure Communication Services Call Automation AI sample demonstrates how to use the Call Automation SDK to answer an inbound call. It recognizes user voice input by using Call Automation to recognize the API with support for speech to text. When the system recognizes the input, it sends that information to OpenAI for an answer. It uses the Call Automation Play API with support for text to speech to play back the answer provided by OpenAI to the caller.
2423

25-
- Create an Azure account with an active subscription. For details, see [Create an account for free](https://azure.microsoft.com/free/)
26-
- Create an Azure Communication Services resource. For details, see [Create an Azure Communication Resource](../../quickstarts/create-communication-resource.md?tabs=windows&pivots=platform-azp). You need to record your resource **connection string** for this sample.
27-
- A Calling-enabled telephone number. [Get a phone number](../../quickstarts/telephony/get-phone-number.md).
28-
- Azure Dev Tunnels CLI. For details, see [Enable dev tunnel](/azure/developer/dev-tunnels/get-started)
29-
- Create an Azure AI services resource. For details, see [Create an Azure AI services Resource](/azure/ai-services/multi-service-resource)
30-
- An Azure OpenAI Resource and Deployed Model. See [instructions](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal).
24+
## Prerequisites
3125

26+
- An Azure account with an active subscription. For more information, see [Create an account for free](https://azure.microsoft.com/free/).
27+
- An Azure Communication Services resource. For more information, see [Create an Azure Communication Services resource](../../quickstarts/create-communication-resource.md?tabs=windows&pivots=platform-azp). You need to record your resource *connection string* for this sample.
28+
- A calling-enabled telephone number. For more information, see [Get a phone number](../../quickstarts/telephony/get-phone-number.md).
29+
- The Azure dev tunnel CLI. For more information, see [Enable dev tunnels](/azure/developer/dev-tunnels/get-started).
30+
- An Azure AI services resource. For more information, see [Create an Azure AI services resource](/azure/ai-services/multi-service-resource).
31+
- An Azure OpenAI resource and deployed model. For more information, see [Create an Azure OpenAI resource and deploy a model](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal).
3232

3333
## Setup instructions
3434

35-
Before running this sample, you need to set up the resources mentioned in the 'Prerequisites' section with the following configuration updates:
35+
Before you run this sample, you need to set up the resources mentioned in the preceding section with the following configuration updates.
3636

37-
##### 1. Setup and host your Azure DevTunnel
37+
#### 1. Set up and host your dev tunnel
3838

39-
[Azure DevTunnels](/azure/developer/dev-tunnels/overview) is an Azure service that enables you to share local web services hosted on the internet. Use the commands below to connect your local development environment to the public internet. This creates a tunnel with a persistent endpoint URL and which allows anonymous access. We'll then use this endpoint to notify your application of calling events from the Azure Communication Services Call Automation service.
39+
With [dev tunnels](/azure/developer/dev-tunnels/overview), you can share local web services that are hosted on the internet. Use the following commands to connect your local development environment to the public internet. This process creates a tunnel with a persistent endpoint URL and allows anonymous access. We use this endpoint to notify your application of calling events from Call Automation.
4040

4141
```bash
4242
devtunnel create --allow-anonymous
@@ -46,30 +46,31 @@ devtunnel host
4646

4747
<a name='2-add-a-managed-identity-to-the-acs-resource-that-connects-to-the-cognitive-services-resource'></a>
4848

49-
##### 2. Add a Managed Identity to the Azure Communication Services Resource that connects to the Azure AI services resource
50-
Follow the instructions in this [documentation](/azure/communication-services/concepts/call-automation/azure-communication-services-azure-cognitive-services-integration).
49+
#### 2. Add a managed identity to the Azure Communication Services resource that connects to the Azure AI services resource
5150

52-
##### 3. Add the required API Keys and endpoints
53-
Open the appsettings.json file to configure the following settings:
51+
Follow the instructions in [Connect Azure Communication Services with Azure AI services](/azure/communication-services/concepts/call-automation/azure-communication-services-azure-cognitive-services-integration).
5452

55-
- `DevTunnelUri`: your dev tunnel endpoint
56-
- `CognitiveServiceEndpoint`: The Azure AI services endpoint
57-
- `AcsConnectionString`: Azure Communication Service resource's connection string.
58-
- `AzureOpenAIServiceKey`: Azure OpenAI Service Key
59-
- `AzureOpenAIServiceEndpoint`: Azure OpenAI Service Endpoint
60-
- `AzureOpenAIDeploymentModelName`: Azure OpenAI Model name
53+
#### 3. Add the required API keys and endpoints
54+
55+
Open the appsettings.json file to configure the following settings:
6156

57+
- `DevTunnelUri`: Your dev tunnel endpoint.
58+
- `CognitiveServiceEndpoint`: Azure AI services endpoint.
59+
- `AcsConnectionString`: Azure Communication Services resource connection string.
60+
- `AzureOpenAIServiceKey`: Azure OpenAI service key.
61+
- `AzureOpenAIServiceEndpoint`: Azure OpenAI service endpoint.
62+
- `AzureOpenAIDeploymentModelName`: Azure OpenAI model name.
6263

6364
## Run the application
6465

65-
1. Azure DevTunnel: Ensure your AzureDevTunnel URI is active and points to the correct port of your localhost application
66-
2. Run `dotnet run` to build and run the sample application
67-
3. Register an Event Grid Webhook for the IncomingCall Event that points to your DevTunnel URI. Instructions [here](/azure/communication-services/concepts/call-automation/incoming-call-notification).
66+
1. Ensure that your `AzureDevTunnel` URI is active and points to the correct port of your local host application.
67+
1. Run `dotnet run` to build and run the sample application.
68+
1. Register an Azure Event Grid webhook for the `IncomingCall` event that points to your `DevTunnel` URI. For more information, see [Incoming call concepts](/azure/communication-services/concepts/call-automation/incoming-call-notification).
6869

70+
Now you have a running application. The best way to test this sample is to place a call to your Azure Communication Services phone number and talk to your intelligent agent.
6971

70-
Once that's completed, you should have a running application. The best way to test this sample is to place a call to your Azure Communication Services phone number and talk to your intelligent agent.
72+
## Related content
7173

72-
## Next steps
7374
- Learn more about [Call Automation](../../concepts/call-automation/call-automation.md).
7475
- Learn more about [playing custom messages](../../how-tos/call-automation/play-action.md).
7576
- Learn more about [recognizing user input](../../how-tos/call-automation/recognize-action.md).

0 commit comments

Comments
 (0)