Skip to content

Commit 9fa1b43

Browse files
committed
openai sample and acrolinx
1 parent b98c64e commit 9fa1b43

File tree

2 files changed

+8
-8
lines changed
  • articles/cognitive-services/Speech-Service/includes/quickstarts/openai-speech

2 files changed

+8
-8
lines changed

articles/cognitive-services/Speech-Service/includes/quickstarts/openai-speech/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ms.author: eur
99
> [!IMPORTANT]
1010
> To complete the steps in this guide, access must be granted to Microsoft Azure OpenAI Service in the desired Azure subscription. Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form at [https://aka.ms/oai/access](https://aka.ms/oai/access).
1111
12-
In this how-to guide, you can use Speech to converse with Azure OpenAI. The text recognized by the Speech service is sent to Azure OpenAI. The text response from Azure OpenAI is then synthesized by the Speech service.
12+
In this how-to guide, you can use [Speech](overview.md) to converse with [Azure OpenAI](/azure/cognitive-services/openai/overview). The text recognized by the Speech service is sent to Azure OpenAI. The text response from Azure OpenAI is then synthesized by the Speech service.
1313

1414
Speak into the microphone to start a conversation with Azure OpenAI.
1515
- Azure Cognitive Services Speech recognizes your speech and converts it into text (speech-to-text).
16-
- Your request as text is sent to the Azure OpenAI service.
16+
- Your request as text is sent to Azure OpenAI.
1717
- Azure Cognitive Services Speech synthesizes (text-to-speech) the response from Azure OpenAI to the default speaker.
1818

1919
Although the experience of this example is a back-and-forth exchange, Azure OpenAI doesn't remember the context of your conversation.

articles/cognitive-services/Speech-Service/includes/quickstarts/openai-speech/python.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Follow these steps to create a new console application.
6060
openai.api_type = 'azure'
6161
openai.api_version = '2022-12-01'
6262
63-
#This will correspond to the custom name you chose for your deployment when you deployed a model.
63+
# This will correspond to the custom name you chose for your deployment when you deployed a model.
6464
deployment_id='text-davinci-002'
6565
6666
# This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
@@ -139,9 +139,9 @@ python openai-speech.py
139139
```
140140

141141
> [!IMPORTANT]
142-
> Make sure that you set the `OPEN_AI_KEY`, `OPEN_AI_ENDPOINT`, `SPEECH__KEY` and `SPEECH__REGION` environment variables as described [above](#set-environment-variables). If you don't set these variables, the sample will fail with an error message.
142+
> Make sure that you set the `OPEN_AI_KEY`, `OPEN_AI_ENDPOINT`, `SPEECH__KEY` and `SPEECH__REGION` environment variables as described [previously](#set-environment-variables). If you don't set these variables, the sample will fail with an error message.
143143
144-
Speak into your microphone when prompted. The console output will include the prompt for you to begin speaking, then your request as text, and then the Azure OpenAI response as text. The Azure OpenAI response should be converted from text to speech and output to the default speaker.
144+
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.
145145

146146
```console
147147
PS C:\dev\openai\python> python.exe .\openai-speech.py
@@ -159,11 +159,11 @@ PS C:\dev\openai\python>
159159
```
160160

161161
## Remarks
162-
Now that you've completed the quickstart, here are some additional considerations:
162+
Now that you've completed the quickstart, here are some more considerations:
163163

164164
- To change the speech recognition language, replace `en-US` with another [supported language](~/articles/cognitive-services/speech-service/supported-languages.md). For example, `es-ES` for Spanish (Spain). The default language is `en-US` if you don't specify a language. For details about how to identify one of multiple languages that might be spoken, see [language identification](~/articles/cognitive-services/speech-service/language-identification.md).
165-
- To change the voice that you hear, replace `en-US-JennyMultilingualNeural` with another [supported voice](~/articles/cognitive-services/speech-service/supported-languages.md#prebuilt-neural-voices). If the voice does not speak the language of the text returned from Azure OpenAI, the Speech service won't output synthesized audio.
166-
- To use a different [deployed](/azure/cognitive-services/openai/how-to/create-resource#deploy-a-model) Azure OpenAI model, replace `text-davinci-002` with another [model](/azure/cognitive-services/openai/concepts/models#model-summary-table-and-region-availability). For example, `text-davinci-003` for the latest version of the Davinci model.
165+
- To change the voice that you hear, replace `en-US-JennyMultilingualNeural` with another [supported voice](~/articles/cognitive-services/speech-service/supported-languages.md#prebuilt-neural-voices). If the voice doesn't speak the language of the text returned from Azure OpenAI, the Speech service doesn't output synthesized audio.
166+
- To use a different [model](/azure/cognitive-services/openai/concepts/models#model-summary-table-and-region-availability), replace `text-davinci-002` with the ID of another [deployment](/azure/cognitive-services/openai/how-to/create-resource#deploy-a-model). Keep in mind that the deployment ID isn't necessarily the same as the model name. You named your deployment when you created it in [Azure OpenAI Studio](https://oai.azure.com/).
167167
- Azure OpenAI also performs content moderation on the prompt inputs and generated outputs. The prompts or responses may be filtered if harmful content is detected. For more information, see the [content filtering](/azure/cognitive-services/openai/concepts/content-filter) article.
168168

169169
## Clean up resources

0 commit comments

Comments
 (0)