|
| 1 | +--- |
| 2 | +title: Connect Azure Communication Services to Azure Cognitive Services |
| 3 | +titleSuffix: An Azure Communication Services how-to document |
| 4 | +description: Provides a how-to guide for connecting ACS to Azure Cognitive Services. |
| 5 | +author: kunaal |
| 6 | +ms.service: azure-communication-services |
| 7 | +ms.subservice: call-automation |
| 8 | +ms.topic: include |
| 9 | +ms.date: 02/15/2023 |
| 10 | +ms.author: kpunjabi |
| 11 | +ms.custom: references_regions |
| 12 | +services: azure-communication-services |
| 13 | +--- |
| 14 | + |
| 15 | +# Connect Azure Communication Services with Azure Cognitive Services |
| 16 | + |
| 17 | +>[!IMPORTANT] |
| 18 | +>Functionality described on this document is currently in private preview. Private preview includes access to SDKs and documentation for testing purposes that are not yet available publicly. |
| 19 | +>Apply to become an early adopter by filling out the form for [preview access to Azure Communication Services](https://aka.ms/acs-tap-invite). |
| 20 | +
|
| 21 | + |
| 22 | +Azure Communication Services Call Automation APIs provide developers the ability to steer and control the ACS Telephony, VoIP or WebRTC calls using real-time event triggers to perform actions based on custom business logic specific to their domain. Within the Call Automation APIs developers can use simple AI powered APIs, which can be used to play personalized greeting messages, recognize conversational voice inputs to gather information on contextual questions to drive a more self-service model with customers, use sentiment analysis to improve customer service overall. These content specific APIs are orchestrated through **Azure Cognitive Services** with support for customization of AI models without developers needing to terminate media streams on their services and streaming back to Azure for AI functionality. |
| 23 | + |
| 24 | +All this is possible with one-click where enterprises can access a secure solution and link their models through the portal. Furthermore, developers and enterprises don't need to manage credentials. Connecting your Cognitive Services uses managed identities to access user-owned resources. Developers can use managed identities to authenticate any resource that supports Azure Active Directory authentication. |
| 25 | + |
| 26 | +BYO Cognitive Services can be easily integrated into any application regardless of the programming language. When creating an Azure Resource in Azure portal, enable the BYO option and provide the URL to the Cognitive Services. This simple experience allows developers to meet their needs, scale, and avoid investing time and resources into designing and maintaining a custom solution. |
| 27 | + |
| 28 | +> [!NOTE] |
| 29 | +> This integration is only supported in limited regions for Azure Cognitive Services, for more information about which regions are supported please view the limitations section at the bottom of this document. It is also recommended that when you're creating a new Azure Cognitive Service resource that you create a Multi-service Cognitive Service resource. |
| 30 | +
|
| 31 | +## Common use cases |
| 32 | + |
| 33 | +### Build applications that can play and recognize speech |
| 34 | + |
| 35 | +With the ability to, connect your Cognitive Services to Azure Communication Services, you can enable custom play functionality, using [Text-to-Speech](../../../../articles/cognitive-services/Speech-Service/text-to-speech.md) and [SSML](../../../../articles/cognitive-services/Speech-Service/speech-synthesis-markup.md) configuration, to play more customized and natural sounding audio to users. Through the Cognitive Services connection, you can also use the Speech-To-Text service to incorporate recognition of voice responses that can be converted into actionable tasks through business logic in the application. These functions can be further enhanced through the ability to create custom models within Cognitive services that are bespoke to your domain and region through the ability to choose which languages are spoken and recognized, custom voices and custom models built based on your experience. |
| 36 | + |
| 37 | +## Run time flow |
| 38 | +[](./media/run-time-flow.png#lightbox) |
| 39 | + |
| 40 | +## Azure portal experience |
| 41 | +You can also configure and bind your Communication Services and Cognitive Services through the Azure portal. |
| 42 | + |
| 43 | +### Add a Managed Identity to the ACS Resource |
| 44 | + |
| 45 | +1. Navigate to your ACS Resource in the Azure portal |
| 46 | +2. Select the Identity tab. |
| 47 | +3. Enable system assigned identity. This action begins the creation of the identity; A pop-up notification appears notifying you that the request is being processed. |
| 48 | + |
| 49 | +[](./media/enable-system-identity.png#lightbox) |
| 50 | + |
| 51 | +### Option 1: Add role from Azure Cognitive Services in the Azure portal |
| 52 | +1. Navigate to your Azure Cognitive Service resource. |
| 53 | +2. Select the "Access control (IAM)" tab. |
| 54 | +3. Click the "+ Add" button. |
| 55 | +4. Select "Add role assignments" from the menu |
| 56 | + |
| 57 | +[](./media/add-role.png#lightbox) |
| 58 | + |
| 59 | +5. Choose the "Cognitive Services User" role to assign, then click "Next". |
| 60 | + |
| 61 | +[](./media/cognitive-service-user.png#lightbox) |
| 62 | + |
| 63 | +6. For the field "Assign access to" choose the "User, group or service principal". |
| 64 | +7. Press "+ Select members" and a side tab opens. |
| 65 | +8. Choose your Azure Communication Services subscription from the "Subscriptions" drop down menu and click "Select". |
| 66 | + |
| 67 | +[](./media/select-acs-resource.png#lightbox) |
| 68 | + |
| 69 | +9. Click “Review + assign”, this assigns the role to the managed identity. |
| 70 | + |
| 71 | +### Option 2: Add role through ACS Identity tab |
| 72 | + |
| 73 | +1. Navigate to your ACS resource in the Azure portal |
| 74 | +2. Select Identity tab |
| 75 | +3. Click on "Azure role assignments" |
| 76 | + |
| 77 | +[](./media/add-role-acs.png#lightbox) |
| 78 | + |
| 79 | +4. Click the "Add role assignment (Preview)" button, which opens the "Add role assignment (Preview)" tab |
| 80 | +5. Select the "Resource group" for "Scope". |
| 81 | +6. Select the "Subscription" // The CogSvcs subscription? |
| 82 | +7. Select the "Resource Group" containing the Cognitive Service |
| 83 | +8. Select the "Role" "Cognitive Services User" |
| 84 | + |
| 85 | +[](./media/acs-roles-cognitive-services.png#lightbox) |
| 86 | + |
| 87 | +10. Click Save |
| 88 | + |
| 89 | +Your Communication Service has now been linked to your Azure Cognitive Service resource. |
| 90 | + |
| 91 | +## Azure Cognitive Services regions supported |
| 92 | + |
| 93 | +This integration between Azure Communication Services and Azure Cognitive Services is only supported in the following regions at this point in time: |
| 94 | +- westus |
| 95 | +- westus2 |
| 96 | +- westus3 |
| 97 | +- eastus |
| 98 | +- eastus2 |
| 99 | +- centralus |
| 100 | +- northcentralus |
| 101 | +- southcentralus |
| 102 | +- westcentralus |
| 103 | +- westeu |
| 104 | + |
| 105 | +## Next Steps |
| 106 | +- Learn about [playing audio](../../concepts/call-automation/play-ai-action.md) to callers using Text-to-Speech. |
| 107 | +- Learn about [gathering user input](../../concepts/call-automation/recognize-ai-action.md) with Speech-to-Text. |
0 commit comments