-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add token auth sample for batch synthesis (#2744)
* Fix legacy voice * Enhance Batch Synthesis Client to support token-based authentication and update README with authentication options
- Loading branch information
Showing
4 changed files
with
47 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 10 additions & 5 deletions
15
samples/batch-synthesis/csharp/BatchSynthesisSample/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
# C# Example to use the Speech Services Batch Synthesis API | ||
|
||
To successfully run this example you require: | ||
To successfully run this example, you must use one of the following authentication methods: | ||
|
||
- A Speech Service subscription key | ||
- The region information matching your subscription key | ||
Option 1: Token-based authentication (Recommended) | ||
|
||
- Set the Speech endpoint (set `SPEECH_ENDPOINT`) | ||
- Ensure your Microsoft Entra account is assigned the "Cognitive Services Speech Contributor" or "Cognitive Services User" role. | ||
|
||
Option 2: Key-based authentication | ||
|
||
- Set the Speech Service subscription key (set `SPEECH_KEY`) | ||
- Set the region matching your subscription key (set `SPEECH_REGION`) | ||
|
||
Optionally: | ||
|
||
- The relationship between custom voice names and deployment ID, if you want to use custom voices | ||
- The URI of a writable Azure blob container, if you want to store the audio files in your own Azure storage | ||
|
||
Set the environment variables `SPEECH_KEY` and `SPEECH_REGION` before running the program. |