You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sample showcases how to voice-enable any agents built with Azure AI Foundry Agent Service, utilizing Azure AI Voice Live API.
3
+
This sample showcases how to voice-enable any agents built with Azure AI Foundry Agent Service, utilizing Azure AI Voice Live API.
4
4
5
-
**IMPORTANT NOTE:** Starter templates, instructions, code samples and resources in this msft-agent-samples file (“samples”) are designed to assist in accelerating development of agents for specific scenarios. It is important that you review all provided resources and carefully test Agent behavior in the context of your use case: ([Learn More](https://learn.microsoft.com/en-us/legal/cognitive-services/agents/transparency-note?context=%2Fazure%2Fai-services%2Fagents%2Fcontext%2Fcontext)).
5
+
**IMPORTANT NOTE:** Starter templates, instructions, code samples and resources in this msft-agent-samples file (“samples”) are designed to assist in accelerating development of agents for specific scenarios. It is important that you review all provided resources and carefully test Agent behavior in the context of your use case: ([Learn More](https://learn.microsoft.com/en-us/legal/cognitive-services/agents/transparency-note?context=%2Fazure%2Fai-services%2Fagents%2Fcontext%2Fcontext)).
6
6
7
-
Certain Agent offerings may be subject to legal and regulatory requirements, may require licenses, or may not be suitable for all industries, scenarios, or use cases. By using any sample, you are acknowledging that Agents or other output created using that sample are solely your responsibility, and that you will comply with all applicable laws, regulations, and relevant safety standards, terms of service, and codes of conduct.
7
+
Certain Agent offerings may be subject to legal and regulatory requirements, may require licenses, or may not be suitable for all industries, scenarios, or use cases. By using any sample, you are acknowledging that Agents or other output created using that sample are solely your responsibility, and that you will comply with all applicable laws, regulations, and relevant safety standards, terms of service, and codes of conduct.
8
8
9
9
## Use cases
10
10
11
-
Voice-enabled agents are high in demand, now more than ever. Voice agents are agents that users can interact with naturally and conversationally using just their voice. From an end-user perspective, voice is becoming the preferred mode of interaction, as it enables speed, accessibility, and multitasking.
11
+
Voice-enabled agents are high in demand, now more than ever. Voice agents are agents that users can interact with naturally and conversationally using just their voice. From an end-user perspective, voice is becoming the preferred mode of interaction, as it enables speed, accessibility, and multitasking.
12
12
13
13
We see increasing demand across several key use-cases including:
14
14
15
-
**Customer service** – think about getting support from your favorite department store, your bank, your travel agency, or even your government;
15
+
**Customer service** – think about getting support from your favorite department store, your bank, your travel agency, or even your government;
16
16
17
17
**Automotive** – think about in-car assistants with hands-free interaction;
18
18
@@ -26,28 +26,28 @@ The system consists of:
26
26
27
27
- An AI Agent created with Azure AI Agent Service. You can create an agent using any of the templates provided in agent-catalog/azure-ai-agent-service-blueprints at main · microsoft/agent-catalog
28
28
29
-
- An Azure Voice Live API request. You can set up your Voice Live API request following the instructions in this document and code sample.
29
+
- An Azure Voice Live API request. You can set up your Voice Live API request following the instructions in this document and code sample.
Azure AI Voice Live API (preview) is an innovative, unified single API that enables streaming interactions with the foundation model of your choice, for both speech input and output. It includes advanced features such as customizable speech recognition, diverse text-to-speech options, brand voices, avatars, audio enhancement, among other functionalities. With Voice Live API, you can add real-time speech interaction capabilities to any agent built with the Azure AI Agent Service.
53
53
@@ -61,35 +61,35 @@ A live demo (<https://aka.ms/voice-agent/demo>) is also available to experience
61
61
62
62
### Prerequisites
63
63
64
-
**Set up an agent**. Follow the templates provided in agent-catalog/azure-ai-agent-service-blueprints at main · microsoft/agent-catalog to create your agent.
64
+
**Set up an agent**. Follow [the templates](../) to create an agent using the Azure AI Agent Service.
65
65
66
66
**Resource and authentication**. An Azure AI Foundry resource is required to access the Voice Live API. To learn how to create an Azure AI Foundry resource, please see: <https://learn.microsoft.com/azure/ai-services/multi-service-resource>.
67
67
68
68
Note: The resource must be in the `eastus2` or `swedencentral` regions at this time. Other regions are not supported.
69
69
70
-
@@ -31,25 +87,24 @@ We support two authentication methods for the Voice Live API:
71
-
72
70
For the recommended keyless authentication with Microsoft Entra ID, you need to:
73
71
74
-
- Assign the `Azure AI User` role to your user account or a managed identity. You can assign roles in the Azure portal under **Access control (IAM)**
75
-
76
-
**Add role assignment**.
72
+
- Assign the `Azure AI User` role to your user account or a managed identity. You can assign roles in the Azure portal under **Access control (IAM)** > **Add role assignment**.
77
73
- Generate a token using the Azure CLI or Azure SDKs. The token must be generated with the `https://ai.azure.com/.default` scope.
78
74
- Use the token in the `Authorization` header of the WebSocket connection request, with the format `Bearer <token>`.
79
75
80
76
## Set Agent Info
81
77
82
78
You are supposed to specify the agent info in the WebSocket endpoint URL.
|`agent-project-name`| The Azure AI project name which the agent belongs to. |
83
+
|`agent-id`| The ID of the agent to use. |
88
84
|`agent-access-token`| The Entra access token to access the agent. Make sure the identity has access to Azure AI Project, You can grant the built-in role `Azure AI User` to the identity. The scope should be `https://ai.azure.com/.default`. |
89
85
90
86
> Note: The token must be generated with the `https://ai.azure.com/.default` scope. e.g., `az account get-access-token --resource https://ai.azure.com --query accessToken -o tsv`.
91
-
A sample endpoint is `wss://<custom-domain>.cognitiveservices.azure.com/voice-agent/realtime?api-version=2025-05-01-preview&agent-project-name=<agent-project-name>&agent-id=<agent-id>&agent-access-token=<access-token>`.
87
+
A sample endpoint is `wss://<your-ai-foundry-resource-name>.cognitiveservices.azure.com/voice-live/realtime?api-version=2025-05-01-preview&agent-project-name=<agent-project-name>&agent-id=<agent-id>&agent-access-token=<access-token>`.
92
88
93
89
## Interact with the Voice Live API
94
90
95
-
Refer to the [full documentation of Voice Live API](https://learn.microsoft.com/azure/ai-services/speech-service/voice-live) for more details on how to interact with the Voice Live API.
91
+
Refer to the [full documentation of Voice Live API](https://learn.microsoft.com/azure/ai-services/<placeholder>) for more details on how to interact with the Voice Live API.
92
+
93
+
## Getting started
94
+
95
+
Follow the instructions [here](./samples/react/README.md) to get started with this sample.
Copy file name to clipboardExpand all lines: samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/package-lock.json
Copy file name to clipboardExpand all lines: samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/src/app/chat-interface.tsx
+31-14Lines changed: 31 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -184,12 +184,16 @@ const readme = `
184
184
- The endpoint can be the regional endpoint (e.g., \`https://<region>.api.cognitive.microsoft.com/\`) or a custom domain endpoint (e.g., \`https://<custom-domain>.cognitiveservices.azure.com/\`).
185
185
- The resource must be in the \`eastus2\` or \`swedencentral\` region. Other regions are not supported.
186
186
187
+
2. **(Optional) Set the Agent**
188
+
- Set the project name and agent ID to connect to a specific agent.
189
+
- Entra ID auth is required for agent mode, use \`az account get-access-token --resource https://ai.azure.com --query accessToken -o tsv\` to get the token.
190
+
187
191
2. **Select noise suppression or echo cancellation**
0 commit comments