Skip to content

Commit 1c949d5

Browse files
committed
voice live with agents quickstart
1 parent ba80327 commit 1c949d5

File tree

5 files changed

+58
-10
lines changed

5 files changed

+58
-10
lines changed

articles/ai-foundry/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,10 @@ items:
483483
items:
484484
- name: What is the Speech service?
485485
href: ../ai-services/speech-service/overview.md?context=/azure/ai-foundry/context/context
486-
- name: Voice live
486+
- name: Voice live with Foundry models quickstart
487487
href: ../ai-services/speech-service/voice-live-quickstart.md?context=/azure/ai-foundry/context/context
488+
- name: Voice live with Foundry agents quickstart
489+
href: ../ai-services/speech-service/voice-live-agents-quickstart.md?context=/azure/ai-foundry/context/context
488490
- name: Real-time speech to text
489491
href: ../ai-services/speech-service/get-started-speech-to-text.md?context=/azure/ai-foundry/context/context
490492
- name: Fast transcription

articles/ai-services/speech-service/includes/quickstarts/voice-live-agents/ai-foundry.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ To try out the voice live demo, follow these steps:
3333

3434
:::image type="content" source="../../../media/voice-live/foundry-portal/capabilities-by-scenario.png" alt-text="Screenshot of filtering Speech service capabilities by scenario." lightbox="../../../media/voice-live/foundry-portal/capabilities-by-scenario.png":::
3535

36-
1. Select a sample scenario, such as **Casual chat**.
37-
38-
:::image type="content" source="../../../media/voice-live/foundry-portal/casual-chat-start.png" alt-text="Screenshot of selecting the casual chat example scenario in the Speech playground." lightbox="../../../media/voice-live/foundry-portal/casual-chat-start.png":::
39-
4036
1. Select an agent that you configured in the **Agents** playground.
4137

4238
:::image type="content" source="../../../media/voice-live/foundry-portal/casual-chat-bring-agent-select.png" alt-text="Screenshot of the option to bring an agent for voice live in the speech playground." lightbox="../../../media/voice-live/foundry-portal/casual-chat-bring-agent-select.png":::

articles/ai-services/speech-service/includes/quickstarts/voice-live-agents/python.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ ms.topic: include
77
ms.date: 7/31/2025
88
---
99

10-
In this article, you learn how to use voice live with [Azure AI Foundry Agent Service](/azure/ai-foundry/agents/overview) and [Azure AI Speech](/azure/ai-services/speech-service/overview) using Python code.
10+
In this article, you learn how to use Azure AI Speech voice live with [Azure AI Foundry Agent Service](/azure/ai-foundry/agents/overview) using Python code.
1111

1212
[!INCLUDE [Introduction](intro.md)]
1313

1414
## Prerequisites
1515

1616
- An Azure subscription. <a href="https://azure.microsoft.com/free/ai-services" target="_blank">Create one for free</a>.
17-
- <a href="https://www.python.org/" target="_blank">Python 3.8 or later version</a>. We recommend using Python 3.10 or later, but having at least Python 3.8 is required. If you don't have a suitable version of Python installed, you can follow the instructions in the [VS Code Python Tutorial](https://code.visualstudio.com/docs/python/python-tutorial#_install-a-python-interpreter) for the easiest way of installing Python on your operating system.
17+
- <a href="https://www.python.org/" target="_blank">Python 3.10 or later version</a>. If you don't have a suitable version of Python installed, you can follow the instructions in the [VS Code Python Tutorial](https://code.visualstudio.com/docs/python/python-tutorial#_install-a-python-interpreter) for the easiest way of installing Python on your operating system.
1818
- An [Azure AI Foundry resource](../../../../multi-service-resource.md) created in one of the supported regions. For more information about region availability, see the [voice live overview documentation](../../../voice-live.md).
1919
- An Azure AI Foundry agent created in the [Azure AI Foundry portal](https://ai.azure.com/?cid=learnDocs). For more information about creating an agent, see the [Create an agent quickstart](/azure/ai-foundry/agents/quickstart).
2020

@@ -103,6 +103,31 @@ For the recommended keyless authentication with Microsoft Entra ID, you need to:
103103
104104
## Start a conversation
105105
106+
The sample code in this quickstart uses Microsoft Entra ID for the recommended keyless authentication. If you prefer to use an API key, you can set the `api_key` variable instead of the `token` variable.
107+
108+
#### [Microsoft Entra ID](#tab/keyless)
109+
110+
```python
111+
client = AsyncAzureVoiceLive(
112+
azure_endpoint = endpoint,
113+
api_version = api_version,
114+
token = token.token,
115+
#api_key = api_key,
116+
)
117+
```
118+
119+
#### [API key](#tab/api-key)
120+
121+
```python
122+
client = AsyncAzureVoiceLive(
123+
azure_endpoint = endpoint,
124+
api_version = api_version,
125+
#token = token.token,
126+
api_key = api_key,
127+
)
128+
```
129+
---
130+
106131
1. Create the `voice-live-agents-quickstart.py` file with the following code:
107132
108133
```python

articles/ai-services/speech-service/includes/quickstarts/voice-live-api/python.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ ms.topic: include
77
ms.date: 7/31/2025
88
---
99

10-
In this article, you learn how to use voice live with generative AI and Azure AI Speech using Python code.
10+
In this article, you learn how to use Azure AI Speech voice live with [Azure AI Foundry models](/azure/ai-foundry/concepts/foundry-models-overview) using Python code.
1111

1212
[!INCLUDE [Introduction](intro.md)]
1313

1414
## Prerequisites
1515

1616
- An Azure subscription. <a href="https://azure.microsoft.com/free/ai-services" target="_blank">Create one for free</a>.
17-
- <a href="https://www.python.org/" target="_blank">Python 3.8 or later version</a>. We recommend using Python 3.10 or later, but having at least Python 3.8 is required. If you don't have a suitable version of Python installed, you can follow the instructions in the [VS Code Python Tutorial](https://code.visualstudio.com/docs/python/python-tutorial#_install-a-python-interpreter) for the easiest way of installing Python on your operating system.
17+
- <a href="https://www.python.org/" target="_blank">Python 3.10 or later version</a>. If you don't have a suitable version of Python installed, you can follow the instructions in the [VS Code Python Tutorial](https://code.visualstudio.com/docs/python/python-tutorial#_install-a-python-interpreter) for the easiest way of installing Python on your operating system.
1818
- An [Azure AI Foundry resource](../../../../multi-service-resource.md) created in one of the supported regions. For more information about region availability, see the [voice live overview documentation](../../../voice-live.md).
1919

2020
> [!TIP]
@@ -102,6 +102,31 @@ For the recommended keyless authentication with Microsoft Entra ID, you need to:
102102
103103
## Start a conversation
104104
105+
The sample code in this quickstart uses Microsoft Entra ID for the recommended keyless authentication. If you prefer to use an API key, you can set the `api_key` variable instead of the `token` variable.
106+
107+
#### [Microsoft Entra ID](#tab/keyless)
108+
109+
```python
110+
client = AsyncAzureVoiceLive(
111+
azure_endpoint = endpoint,
112+
api_version = api_version,
113+
token = token.token,
114+
#api_key = api_key,
115+
)
116+
```
117+
118+
#### [API key](#tab/api-key)
119+
120+
```python
121+
client = AsyncAzureVoiceLive(
122+
azure_endpoint = endpoint,
123+
api_version = api_version,
124+
#token = token.token,
125+
api_key = api_key,
126+
)
127+
```
128+
---
129+
105130
1. Create the `voice-live-quickstart.py` file with the following code:
106131
107132
```python

articles/ai-services/speech-service/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ items:
238238
items:
239239
- name: Voice live overview
240240
href: voice-live.md
241-
- name: Voice live quickstart
241+
- name: Voice live with Foundry models quickstart
242242
href: voice-live-quickstart.md
243243
- name: Voice live with Foundry agents quickstart
244244
href: voice-live-agents-quickstart.md

0 commit comments

Comments
 (0)