Skip to content

Commit 9d8ad7e

Browse files
committed
gpt-4o real-time audio playground
1 parent c51df2b commit 9d8ad7e

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ms.date: 10/1/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,15 +55,31 @@ 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

5960
## Use the GPT-4o Realtime API
6061

61-
> [!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-
6462
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).
6563

64+
::: zone pivot="programming-language-ai-studio"
65+
66+
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:
67+
68+
1. Go to your project in [Azure AI Studio](https://ai.azure.com).
69+
1. Select **Playgrounds** > **Real-time audio** from the left pane.
70+
1. Select your deployed `gpt-4o-realtime-preview` model from the **Deployment** dropdown.
71+
72+
:::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":::
73+
74+
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.
75+
1. Optionally, change settings such as threshold, prefix padding, and silence duration.
76+
1. Select **Start listening** to start the session. You can speak into the microphone to start a chat.
77+
1. You can interrupt the chat at any time by speaking. You can end the chat by selecting the **Stop listening** button.
78+
79+
::: zone-end
80+
81+
::: zone pivot="programming-language-javascript"
82+
6683
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.
6784

6885
You can run the sample code locally on your machine by following these steps. Refer to the [repository on GitHub](https://github.com/azure-samples/aoai-realtime-audio-sdk) for the most up-to-date instructions.
@@ -103,6 +120,8 @@ You can run the sample code locally on your machine by following these steps. Re
103120
1. You should see a `<< Session Started >>` message in the main output. Then you can speak into the microphone to start a chat.
104121
1. You can interrupt the chat at any time by speaking. You can end the chat by selecting the **Stop** button.
105122
123+
::: zone-end
124+
106125
## Related content
107126
108127
* Learn more about Azure OpenAI [deployment types](./deployment-types.md)
435 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)