azd) to deploy a hosted text agent and a voice wrapper in Microsoft Foundry Agent Service. The hosted agent handles conversation logic and model calls. Voice Live handles speech recognition, turn detection, speech synthesis, and playback interruption.
This workflow uses the Voice Live Bridge basic Python sample. Its azure.yaml defines both agents. You don’t need to create the wrapper separately.
Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Prerequisites
- Azure Developer CLI version 1.32.0 or later and the Foundry extensions. Check that the extension exposes the public-preview voice CLI options.
- An authenticated
azdsession. Runazd auth loginbefore initialization. - The Azure permissions needed to provision Foundry resources.
- Access to voice agents and hosted agents in the selected subscription and region.
- Model availability and sufficient quota for the
gpt-5.4-minideployment declared in the sample. - A voice client, such as the Foundry voice playground where available, and a microphone and speakers to test a spoken conversation.
Initialize the sample
This walkthrough creates a new Foundry project. To reuse an existing project and model deployment, follow the sample’s existing-project instructions instead. Don’t apply the new-project provisioning steps below to a shared project. In PowerShell, create an empty directory and initialize from the public sample manifest:azure.yaml:
Review the target and voice wrapper
The sample declares twoazure.ai.agent services:
The wrapper includes these fields under
services in azure.yaml:
uses dependency deploys the target before the wrapper. conversationEngine.name is the hosted target’s service name in azure.yaml. The optional conversationEngine.version defaults to deployed, which selects the target version deployed by the current azd environment.
The wrapper and hosted target must have different Foundry agent names. Keep their name values distinct even if you rename the sample’s services.
Keep model calls, instructions, and tools in the hosted target. Configure audio, voice output, and the greeting on the wrapper. Don’t use the older modelType: hosted_agent or targetAgent settings.
The target must declare invocations_ws version 1.0.0, with voiceLiveCompatible: "true" and bridgeProtocolVersion: "1.0" in its metadata. The sample already supplies these settings.
This wrapper workflow doesn’t replace custom audio pipelines hosted through invocations_ws. In this sample, the hosted target exchanges text and control events with Voice Live rather than processing caller audio itself.
For field details, see the voice service configuration reference.
Provision and deploy both agents
From the generated project directory, provision the Foundry project and the model declared inazure.yaml:
azd deploys both the target and the wrapper:
Test the voice wrapper
Connect your voice client tovoice-live-bridge-basic-python-voice, not to the hosted target. The caller uses the wrapper’s voice endpoint; Voice Live exchanges Bridge Protocol events with the hosted target.
Use the Foundry voice playground where available. To use the SDK client, adapt the quickstart’s storage-enabled example as described in this section.
Adapt the SDK client for storage-disabled sessions
Complete the Python SDK package installation and environment setup. SetFOUNDRY_PROJECT_ENDPOINT to your deployed project’s endpoint and FOUNDRY_VOICE_AGENT_NAME to voice-live-bridge-basic-python-voice. Use the existing wrapper; don’t run the quickstart’s agent-creation examples.
Copy talk_to_voice_agent.py from Talk to the agent. The wrapper uses store: false, so a persisted conversation ID isn’t required for a successful voice response. Remove this storage-only check from the copied script:
audio_chunks check, and the code that writes reply.wav. Remove the final print(f"Conversation id: {conversation_id}") line. Skip the quickstart’s Read the conversation back section. Don’t enable store: true just to satisfy the example’s storage checks. The adapted script still saves response audio locally in reply.wav.
Check text and audio
For the/help check in the copied SDK script, set the outgoing message’s text value to /help.
- Send
/helpas a text turn. Confirm that the response containsCommands:. This checks the sample’s command path without making a model call. - Ask a short question to exercise the target’s model deployment.
- Send a spoken turn. Confirm that input transcription, response text, and audible output are present.
- Speak while the agent responds, and check interruption behavior.
azd ai agent invoke doesn’t generate Voice Live conversations. Selecting the voice wrapper returns portal guidance, not a voice session. For local Bridge Protocol checks, use the sample’s protocol smoke client.