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).
This template, the application code and configuration it contains, has been built to showcase Microsoft Azure specific services and tools. We strongly advise our customers not to make this code part of their production environments without implementing or enabling additional security features. Learn more from Security for Azure AI Voice Live API.
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.
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:
az
azd
python
uv
docker
Pick 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
venv
and 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:
IncomingCall
Web Hook
https://<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
Please refer to Transparency Note for responsible AI transparency details of the voice live api.
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.