Skip to content

Commit 85000a8

Browse files
Merge pull request #260000 from eric-urban/eur/speech-to-speech
update model and format
2 parents 853c3ff + 187d507 commit 85000a8

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

articles/ai-services/speech-service/includes/quickstarts/openai-speech/csharp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Follow these steps to create a new console application.
4141
```
4242
1. Replace the contents of `Program.cs` with the following code.
4343
44-
```csharp
44+
```csharp
4545
using System;
4646
using System.IO;
4747
using System.Threading.Tasks;
@@ -59,7 +59,7 @@ Follow these steps to create a new console application.
5959
static string openAIEndpoint = Environment.GetEnvironmentVariable("OPEN_AI_ENDPOINT");
6060
6161
// Enter the deployment name you chose when you deployed the model.
62-
static string engine = "text-davinci-003";
62+
static string engine = "gpt-35-turbo-instruct";
6363
6464
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
6565
static string speechKey = Environment.GetEnvironmentVariable("SPEECH_KEY");
@@ -189,7 +189,7 @@ Follow these steps to create a new console application.
189189
}
190190
}
191191
}
192-
```
192+
```
193193
194194
1. To increase or decrease the number of tokens returned by Azure OpenAI, change the `MaxTokens` property in the `CompletionsOptions` class instance. For more information tokens and cost implications, see [Azure OpenAI tokens](/azure/ai-services/openai/overview#tokens) and [Azure OpenAI pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/).
195195
@@ -224,7 +224,7 @@ Now that you've completed the quickstart, here are some more considerations:
224224

225225
- To change the speech recognition language, replace `en-US` with another [supported language](~/articles/ai-services/speech-service/language-support.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/ai-services/speech-service/language-identification.md).
226226
- To change the voice that you hear, replace `en-US-JennyMultilingualNeural` with another [supported voice](~/articles/ai-services/speech-service/language-support.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.
227-
- To use a different [model](/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability), replace `text-davinci-003` with the ID of another [deployment](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal#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/).
227+
- To use a different [model](/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability), replace `gpt-35-turbo-instruct` with the ID of another [deployment](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal#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/).
228228
- 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/ai-services/openai/concepts/content-filter) article.
229229

230230
## Clean up resources

articles/ai-services/speech-service/includes/quickstarts/openai-speech/python.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Follow these steps to create a new console application.
4848

4949
1. Copy the following code into `openai-speech.py`:
5050

51-
```Python
51+
```Python
5252
import os
5353
import azure.cognitiveservices.speech as speechsdk
5454
import openai
@@ -61,7 +61,7 @@ Follow these steps to create a new console application.
6161
openai.api_version = '2022-12-01'
6262
6363
# This will correspond to the custom name you chose for your deployment when you deployed a model.
64-
deployment_id='text-davinci-003'
64+
deployment_id='gpt-35-turbo-instruct'
6565
6666
# This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
6767
speech_config = speechsdk.SpeechConfig(subscription=os.environ.get('SPEECH_KEY'), region=os.environ.get('SPEECH_REGION'))
@@ -132,7 +132,7 @@ Follow these steps to create a new console application.
132132
chat_with_open_ai()
133133
except Exception as err:
134134
print("Encountered exception. {}".format(err))
135-
```
135+
```
136136

137137
1. To increase or decrease the number of tokens returned by Azure OpenAI, change the `max_tokens` parameter. For more information tokens and cost implications, see [Azure OpenAI tokens](/azure/ai-services/openai/overview#tokens) and [Azure OpenAI pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/).
138138

@@ -167,7 +167,7 @@ Now that you've completed the quickstart, here are some more considerations:
167167

168168
- To change the speech recognition language, replace `en-US` with another [supported language](~/articles/ai-services/speech-service/language-support.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/ai-services/speech-service/language-identification.md).
169169
- To change the voice that you hear, replace `en-US-JennyMultilingualNeural` with another [supported voice](~/articles/ai-services/speech-service/language-support.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.
170-
- To use a different [model](/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability), replace `text-davinci-003` with the ID of another [deployment](/azure/ai-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/).
170+
- To use a different [model](/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability), replace `gpt-35-turbo-instruct` with the ID of another [deployment](/azure/ai-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/).
171171
- 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/ai-services/openai/concepts/content-filter) article.
172172

173173
## Clean up resources

articles/ai-services/speech-service/openai-speech.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
title: "Azure OpenAI speech to speech chat - Speech service"
33
titleSuffix: Azure AI services
44
description: 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.
5-
#services: cognitive-services
65
author: eric-urban
76
manager: nitinme
87
ms.service: azure-ai-speech
98
ms.custom: build-2023, build-2023-dataai, devx-track-python
109
ms.topic: how-to
11-
ms.date: 04/15/2023
10+
ms.date: 11/30/2023
1211
ms.author: eur
1312
zone_pivot_groups: programming-languages-csharp-python
1413
keywords: speech to text, openai

0 commit comments

Comments
 (0)