Skip to content

Commit 4884263

Browse files
authored
Merge pull request #619 from eric-urban/eur/real-time-playground
gpt-4o real-time audio playground
2 parents 9cd856e + cf31c0b commit 4884263

File tree

4 files changed

+37
-5
lines changed

4 files changed

+37
-5
lines changed

articles/ai-services/openai/how-to/audio-real-time.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ description: Learn how to use GPT-4o Realtime API for speech and audio with Azur
55
manager: nitinme
66
ms.service: azure-ai-openai
77
ms.topic: how-to
8-
ms.date: 10/1/2024
8+
ms.date: 10/3/2024
99
author: eric-urban
1010
ms.author: eur
1111
ms.custom: references_regions
12+
zone_pivot_groups: openai-studio-js
1213
recommendations: false
1314
---
1415

@@ -54,14 +55,35 @@ You can deploy the model from the [Azure AI Studio model catalog](../../../ai-st
5455
1. Modify other default settings depending on your requirements.
5556
1. Select **Deploy**. You land on the deployment details page.
5657

57-
Now that you have a deployment of the `gpt-4o-realtime-preview` model, you can use the Realtime API to interact with it in real time.
58+
Now that you have a deployment of the `gpt-4o-realtime-preview` model, you can use the AI Studio **Real-time audio** playground or Realtime API to interact with it in real time.
5859

59-
## Use the GPT-4o Realtime API
60+
## Use the GPT-4o real-time audio
6061

6162
> [!TIP]
62-
> A playground for GPT-4o real-time audio is coming soon to [Azure AI Studio](https://ai.azure.com). You can already use the API directly in your application.
63+
> Right now, the fastest way to get started development with the GPT-4o Realtime API is to download the sample code from the [Azure OpenAI GPT-4o real-time audio repository on GitHub](https://github.com/azure-samples/aoai-realtime-audio-sdk).
6364
64-
Right now, the fastest way to get started with the GPT-4o Realtime API is to download the sample code from the [Azure OpenAI GPT-4o real-time audio repository on GitHub](https://github.com/azure-samples/aoai-realtime-audio-sdk).
65+
::: zone pivot="programming-language-ai-studio"
66+
67+
To chat with your deployed `gpt-4o-realtime-preview` model in the [Azure AI Studio](https://ai.azure.com) **Real-time audio** playground, follow these steps:
68+
69+
1. Go to your project in [Azure AI Studio](https://ai.azure.com).
70+
1. Select **Playgrounds** > **Real-time audio** from the left pane.
71+
1. Select your deployed `gpt-4o-realtime-preview` model from the **Deployment** dropdown.
72+
1. Select **Enable microphone** to allow the browser to access your microphone. If you already granted permission, you can skip this step.
73+
74+
:::image type="content" source="../media/how-to/real-time/real-time-playground.png" alt-text="Screenshot of the real-time audio playground with the deployed model selected." lightbox="../media/how-to/real-time/real-time-playground.png":::
75+
76+
1. Optionally you can edit contents in the **Give the model instructions and context** text box. Give the model instructions about how it should behave and any context it should reference when generating a response. You can describe the assistant's personality, tell it what it should and shouldn't answer, and tell it how to format responses.
77+
1. Optionally, change settings such as threshold, prefix padding, and silence duration.
78+
1. Select **Start listening** to start the session. You can speak into the microphone to start a chat.
79+
80+
:::image type="content" source="../media/how-to/real-time/real-time-playground-start-listening.png" alt-text="Screenshot of the real-time audio playground with the start listening button and microphone access enabled." lightbox="../media/how-to/real-time/real-time-playground-start-listening.png":::
81+
82+
1. You can interrupt the chat at any time by speaking. You can end the chat by selecting the **Stop listening** button.
83+
84+
::: zone-end
85+
86+
::: zone pivot="programming-language-javascript"
6587

6688
The JavaScript web sample demonstrates how to use the GPT-4o Realtime API to interact with the model in real time. The sample code includes a simple web interface that captures audio from the user's microphone and sends it to the model for processing. The model responds with text and audio, which the sample code renders in the web interface.
6789

@@ -103,6 +125,8 @@ You can run the sample code locally on your machine by following these steps. Re
103125
1. You should see a `<< Session Started >>` message in the main output. Then you can speak into the microphone to start a chat.
104126
1. You can interrupt the chat at any time by speaking. You can end the chat by selecting the **Stop** button.
105127
128+
::: zone-end
129+
106130
## Related content
107131
108132
* Learn more about Azure OpenAI [deployment types](./deployment-types.md)
303 KB
Loading
326 KB
Loading

zone-pivots/zone-pivot-groups.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,3 +841,11 @@ groups:
841841
title: Python
842842
- id: programming-language-powershell
843843
title: PowerShell
844+
- id: openai-studio-js
845+
title: Programming languages
846+
prompt: Choose your preferred usage method
847+
pivots:
848+
- id: programming-language-ai-studio
849+
title: AI Studio
850+
- id: programming-language-javascript
851+
title: JavaScript

0 commit comments

Comments
 (0)