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
Copy file name to clipboardExpand all lines: articles/ai-services/speech-service/includes/quickstarts/openai-speech/python.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ This example requires environment variables named `AZURE_OPENAI_API_KEY`, `AZURE
35
35
36
36
Follow these steps to create a new console application.
37
37
38
-
1. Open a command prompt window in the folder where you want the new project. Open a command prompt where you want the new project, and create a new file named `openai-speech.py`.
38
+
1. Open a command prompt window in the folder where you want the new project. Open a command prompt where you want the new project, and create a new file named `azure-openai-speech.py`.
39
39
40
40
1. Run this command to install the Speech SDK:
41
41
@@ -52,7 +52,7 @@ Follow these steps to create a new console application.
52
52
> [!NOTE]
53
53
> This library is maintained by OpenAI, not Microsoft Azure. Refer to the [release history](https://github.com/openai/openai-python/releases) or the [version.py commit history](https://github.com/openai/openai-python/commits/main/openai/version.py) to track the latest updates to the library.
54
54
55
-
1. Create a file named *openai-speech.py*. Copy the following code into that file:
55
+
1. Create a file named *azure-openai-speech.py*. Copy the following code into that file:
56
56
57
57
```Python
58
58
import os
@@ -86,7 +86,7 @@ Follow these steps to create a new console application.
print("No speech could be recognized: {}".format(speech_recognition_result.no_match_details))
129
129
break
@@ -138,7 +138,7 @@ Follow these steps to create a new console application.
138
138
# Main
139
139
140
140
try:
141
-
chat_with_open_ai()
141
+
chat_with_azure_openai()
142
142
except Exception as err:
143
143
print("Encountered exception. {}".format(err))
144
144
```
@@ -148,7 +148,7 @@ Follow these steps to create a new console application.
148
148
1. Run your new console application to start speech recognition from a microphone:
149
149
150
150
```console
151
-
python openai-speech.py
151
+
python azure-openai-speech.py
152
152
```
153
153
154
154
> [!IMPORTANT]
@@ -157,7 +157,7 @@ Follow these steps to create a new console application.
157
157
Speak into your microphone when prompted. The console output includes the prompt for you to begin speaking, then your request as text, and then the response from Azure OpenAI as text. The response from Azure OpenAI should be converted from text to speech and then output to the default speaker.
#customer intent: As a developer, I want to create a voice-based chat system to talk to the OpenAI application I host through Azure to simplify AI interactions.
14
+
#customer intent: As a developer, I want to create a voice-based chat system to talk to the Azure OpenAI application I host through Azure to simplify AI interactions.
0 commit comments