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/openai/includes/text-to-speech-dotnet.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,6 @@ recommendations: false
16
16
- An Azure OpenAI resource with a Whisper model deployed in a [supported region](../concepts/models.md#whisper-models). For more information, see [Create a resource and deploy a model with Azure OpenAI](../how-to/create-resource.md).
1. Create a .NET app using the `dotnet new` command:
@@ -45,8 +43,8 @@ To make requests to your Azure OpenAI service, you need the service endpoint as
45
43
- [Microsoft Entra ID](/entra/fundamentals/whatis) is the recommended approach for authenticating to Azure services and is more secure than key-based alternatives.
46
44
- Access keys allow you to provide a secret key to connect to your resource.
47
45
48
-
> [!IMPORTANT]
49
-
> Access keys should be used with caution. If your service access key is lost or accidentally exposed in an insecure location, your service may become vulnerable. Anyone who has the access key is able to authorize requests against the Azure OpenAI service.
46
+
> [!IMPORTANT]
47
+
> Access keys should be used with caution. If your service access key is lost or accidentally exposed in an insecure location, your service may become vulnerable. Anyone who has the access key is able to authorize requests against the Azure OpenAI service.
50
48
51
49
### Get the Azure OpenAI endpoint
52
50
@@ -81,7 +79,7 @@ The access key value can be found in the **Keys & Endpoint** section when examin
81
79
using Azure.Identity; // Required for Passwordless auth
82
80
83
81
var endpoint = new Uri(
84
-
Environment.GetEnvironmentVariable("YOUR_OPENAI_ENDPOINT") ?? throw new ArgumentNullException());
82
+
Environment.GetEnvironmentVariable("YOUR_OPENAI_ENDPOINT") ?? throw new ArgumentNullException());
85
83
var credentials = new DefaultAzureCredential();
86
84
87
85
// Use this line for key auth
@@ -111,4 +109,4 @@ The access key value can be found in the **Keys & Endpoint** section when examin
111
109
dotnet run
112
110
```
113
111
114
-
The app generates an audio file at the location you specified for the `speechFilePath` variable. Play the file on your device to hear the generated audio.
112
+
The app generates an audio file at the location you specified for the `speechFilePath` variable. Play the file on your device to hear the generated audio.
0 commit comments