Lightweight template to test real-time voice calls using Azure Communication Services (ACS) Call Automation + Azure Voice Live API โ no PSTN number needed. Start locally with uv run, deploy later to Azure Web App.
This sample demonstrates how to build a real-time voice assistant using the Azure Speech Voice Live API, now in public preview.
The solution includes:
- A backend service that connects to the Voice Live API for real-time ASR, LLM and TTS
- Two client options: Web browser (microphone/speaker) and Azure Communication Services (ACS) phone calls
- Flexible configuration to customize prompts, ASR, TTS, and behavior
- Easy extension to other client types such as Audiohook
You can also try the Voice Live API via Azure AI Foundry for quick experimentation before deploying this template to your own Azure subscription.
- Azure CLI:
az - Azure Developer CLI:
azd - Python:
python - UV:
uv - Optionally Docker:
docker
-
Sign up for a free Azure account and create an Azure Subscription.
-
Login to Azure:
azd auth login
-
Provision and deploy all the resources:
azd up
It will prompt you to provide an
azdenvironment 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
azdhas 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.
- Go to the Azure Portal and navigate to the Resource Group created by your deployment.
- Find and open the Container App resource.
- On the Overview page, copy the Application URL.
- Open the URL in your browser โ a demo webpage should load.
- Click Start Talking to Agent to begin a voice session using your browserโs microphone and speaker.
- Click Stop Conversation to end the session.
โ ๏ธ 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).
-
In the same resource group, find and open the Communication Services resource.
-
In the left-hand menu, click Events.
-
Click + Event Subscription and fill in the following:
- Event Type:
IncomingCall - Endpoint Type:
Web Hook - Endpoint Address:
Replace
https://<your-container-app-url>/acs/incomingcall<your-container-app-url>with the Application URL from your Container App.
- Event Type:
๐ธ 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:
- Dial the ACS number.
- Your call will connect to the real-time voice agent powered by Azure Voice Live.
When you no longer need the resources created in this article, run the following command to power down the app:
azd downIf 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.
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
This project welcomes contributions and suggestions. Please see CONTRIBUTING.md for details.
This project is licensed under the MIT License. See LICENSE.md for details.

