Welcome to the Call Center Real-time Voice Agent solution accelerator. It’s a lightweight template to create speech-to-speech voice agents that deliver personalized self-service experiences and natural-sounding voices, seamlessly integrated with telephony systems. This solution accelerator uses Azure Voice Live API and Azure Communication Services — Start locally, deploy later to Azure Web App. No PSTN number needed.
The Azure voice live API is a solution enabling low-latency, high-quality speech to speech interactions for voice agents. The API is designed for developers seeking scalable and efficient voice-driven experiences as it eliminates the need to manually orchestrate multiple components. By integrating speech recognition, generative AI, and text to speech functionalities into a single, unified interface, it provides an end-to-end solution for creating seamless experiences. Learn more about Azure Voice Live API.
The Azure Communication Services Calls Automation APIs provide telephony integration and 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. Learn more about Azure Communication Services (Call Automation).
Note: With any AI solutions you create using these templates, you are responsible for assessing all associated risks, and for complying with all applicable laws and safety standards. Learn more in the transparency documents for Voice Live API and Azure Communication Services.
This sample demonstrates how to build a real-time voice agent using the Azure Speech Voice Live API.
The solution includes:
You can also try the Voice Live API via Azure AI Foundry for quick experimentation before deploying this template to your own Azure subscription.
|
|
|—|
To deploy this solution accelerator, ensure you have access to an Azure subscription with the necessary permissions to create resource groups and resources. Follow the steps in Azure Account Set Up.
Check the Azure Products by Region page and select a region where the following services are available: Azure AI Foundry Speech, Azure Communication Services, Azure Container Apps, and Container Registry.
Here are some example regions where the services are available: East US2, West US2, Southeast Asia, Central India, Sweden Central. Pricing varies per region and usage, so it isn’t possible to predict exact costs for your usage. The majority of the Azure resources used in this infrastructure are on usage-based pricing tiers. However, Azure Container Registry has a fixed cost per registry per day.
Use the Azure pricing calculator to calculate the cost of this solution in your subscription.
| Product | Description | Cost |
|---|---|---|
| Azure Speech Voice Live | Low-latency and high-quality speech to speech interactions | Pricing |
| Azure Communication Services | Server-based intelligent call workflows | Pricing |
| Azure Container Apps | Hosts the web application frontend | Pricing |
| Azure Container Registry | Stores container images for deployment | Pricing |
Here are some developers tools to set up as prerequisites:
azazdpythonuvdockerPick from the options below to see step-by-step instructions for: GitHub Codespaces, VS Code Dev Containers, Local Environments, and Bicep deployments.
Once you’ve opened the project in Codespaces or in Dev Containers or locally, you can deploy it to Azure following the following steps.
To change the azd parameters from the default values, follow the steps here.
Login to Azure:
azd auth login
Provision and deploy all the resources:
azd up
It will prompt you to provide an azd environment name (like “flask-app”), select a subscription from your Azure account, and select a location (like “eastus”). Then it will provision the resources in your account and deploy the latest code. If you get an error with deployment, changing the location can help, as there may be availability constraints for some of the resources.
When azd has finished deploying, you’ll see an endpoint URI in the command output. Visit that URI, and you should see the API output! 🎉
When you’ve made any changes to the app code, you can just run:
azd deploy
[!NOTE] AZD will also setup the local Python environment for you, using
venvand installing the required packages.
[!NOTE]
- Region: swedencentral is strongly recommended due to AI Foundry availability.
- Post-Deployment: You can also setup ACS Event Grid subscription and PSTN to use the ACS client.
After deployment, you can verify that your Voice Agent is running correctly using either the Web Client (for quick testing) or the ACS Phone Client (for simulating a real-world call center scenario).
🌐 Web Client (Test Mode)
Use this browser-based client to confirm your Container App is up and responding.
⚠️ This web client is intended for testing purposes only. Use the ACS client below for production-like call flow testing.
📞 ACS Client (Call Center Scenario)
This simulates a real inbound phone call to your voice agent using Azure Communication Services (ACS).
Click + Event Subscription and fill in the following:
IncomingCallWeb Hookhttps://<your-container-app-url>/acs/incomingcall
Replace <your-container-app-url> with the Application URL from your Container App.
📸 Refer to the screenshot below for guidance:

If you haven’t already, obtain a phone number for your ACS resource:
👉 How to get a phone number (Microsoft Docs)
Once your event subscription is configured and the phone number is active:
Once the environment has been deployed with azd up you can also run the application locally.
Please follow the instructions in the instructions in service
When you no longer need the resources created in this article, run the following command to power down the app:
azd down
If you want to redeploy to a different region, delete the .azure directory before running azd up again. In a more advanced scenario, you could selectively edit files within the .azure directory to change the region.
ACS currently does not support Managed Identity. The ACS connection string is stored securely in Key Vault and injected into the container app via its secret URL.
To the extent that the Software includes components or code used in or derived from Microsoft products or services, including without limitation Microsoft Azure Services (collectively, “Microsoft Products and Services”), you must also comply with the Product Terms applicable to such Microsoft Products and Services. You acknowledge and agree that the license governing the Software does not grant you a license or other right to use Microsoft Products and Services. Nothing in the license or this ReadMe file will serve to supersede, amend, terminate or modify any terms in the Product Terms for any Microsoft Products and Services.
You must also comply with all domestic and international export laws and regulations that apply to the Software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit https://aka.ms/exporting.
You acknowledge that the Software and Microsoft Products and Services (1) are not designed, intended or made available as a medical device(s), and (2) are not designed or intended to be a substitute for professional medical advice, diagnosis, treatment, or judgment and should not be used to replace or as a substitute for professional medical advice, diagnosis, treatment, or judgment. Customer is solely responsible for displaying and/or obtaining appropriate consents, warnings, disclaimers, and acknowledgements to end users of Customer’s implementation of the Online Services.
You acknowledge the Software is not subject to SOC 1 and SOC 2 compliance audits. No Microsoft technology, nor any of its component technologies, including the Software, is intended or made available as a substitute for the professional advice, opinion, or judgement of a certified financial services professional. Do not use the Software to replace, substitute, or provide professional financial advice or judgment.
BY ACCESSING OR USING THE SOFTWARE, YOU ACKNOWLEDGE THAT THE SOFTWARE IS NOT DESIGNED OR INTENDED TO SUPPORT ANY USE IN WHICH A SERVICE INTERRUPTION, DEFECT, ERROR, OR OTHER FAILURE OF THE SOFTWARE COULD RESULT IN THE DEATH OR SERIOUS BODILY INJURY OF ANY PERSON OR IN PHYSICAL OR ENVIRONMENTAL DAMAGE (COLLECTIVELY, “HIGH-RISK USE”), AND THAT YOU WILL ENSURE THAT, IN THE EVENT OF ANY INTERRUPTION, DEFECT, ERROR, OR OTHER FAILURE OF THE SOFTWARE, THE SAFETY OF PEOPLE, PROPERTY, AND THE ENVIRONMENT ARE NOT REDUCED BELOW A LEVEL THAT IS REASONABLY, APPROPRIATE, AND LEGAL, WHETHER IN GENERAL OR IN A SPECIFIC INDUSTRY. BY ACCESSING THE SOFTWARE, YOU FURTHER ACKNOWLEDGE THAT YOUR HIGH-RISK USE OF THE SOFTWARE IS AT YOUR OWN RISK.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at here. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Note: