Skip to content

Commit f956796

Browse files
authored
Merge pull request #249263 from TimShererWithAquent/us141588e
Azure OpenAI Freshness Pass - User Story: 141588
2 parents a6111a5 + d5ba62d commit f956796

File tree

12 files changed

+463
-426
lines changed

12 files changed

+463
-426
lines changed

articles/ai-services/speech-service/get-started-text-to-speech.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: "Text to speech quickstart - Speech service"
33
titleSuffix: Azure AI services
4-
description: In this quickstart, you convert text to speech. Learn about object construction and design patterns, supported audio output formats, and custom configuration options for speech synthesis.
4+
description: In this quickstart, you convert text to speech. Learn about object construction and design patterns, supported audio formats, and custom configuration options.
55
services: cognitive-services
66
author: eric-urban
77
manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: speech-service
1010
ms.topic: quickstart
11-
ms.date: 09/16/2022
11+
ms.date: 08/25/2023
1212
ms.author: eur
1313
ms.devlang: cpp, csharp, golang, java, javascript, objective-c, python
1414
ms.custom: devx-track-python, devx-track-js, devx-track-csharp, cog-serv-seo-aug-2020, mode-other, devx-track-extended-java, devx-track-go

articles/ai-services/speech-service/includes/quickstarts/text-to-speech-basics/cli.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: cognitive-services
44
ms.topic: include
5-
ms.date: 03/15/2022
5+
ms.date: 08/25/2023
66
ms.author: eur
77
---
88

@@ -18,30 +18,31 @@ ms.author: eur
1818

1919
## Synthesize to speaker output
2020

21-
Run the following command for speech synthesis to the default speaker output. You can modify the text to be synthesized and the voice.
21+
Run the following command for speech synthesis to the default speaker output. You can modify the voice and the text to be synthesized.
2222

2323
```console
2424
spx synthesize --text "I'm excited to try text to speech" --voice "en-US-JennyNeural"
2525
```
2626

27-
If you don't set a voice name, the default voice for `en-US` will speak. All neural voices are multilingual and fluent in their own language and English. For example, if the input text in English is "I'm excited to try text to speech" and you set `--voice "es-ES-ElviraNeural"`, the text is spoken in English with a Spanish accent. If the voice does not speak the language of the input text, the Speech service won't output synthesized audio.
27+
If you don't set a voice name, the default voice for `en-US` speaks.
2828

29-
## Remarks
29+
All neural voices are multilingual and fluent in their own language and English. For example, if the input text in English is "I'm excited to try text to speech" and you set `--voice "es-ES-ElviraNeural"`, the text is spoken in English with a Spanish accent. If the voice doesn't speak the language of the input text, the Speech service doesn't output synthesized audio.
3030

31-
Now that you've completed the quickstart, here are some additional considerations:
31+
## Remarks
3232

3333
You can have finer control over voice styles, prosody, and other settings by using [Speech Synthesis Markup Language (SSML)](~/articles/ai-services/speech-service/speech-synthesis-markup.md).
3434

35-
In the following example, the voice and style ('excited') are provided in the SSML block.
35+
- In the following example, the voice and style, `excited`, are provided in the SSML block.
3636

37-
```console
38-
spx synthesize --ssml "<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='https://www.w3.org/2001/mstts' xml:lang='en-US'><voice name='en-US-JennyNeural'><mstts:express-as style='excited'>I'm excited to try text to speech</mstts:express-as></voice></speak>"
39-
```
37+
```console
38+
spx synthesize --ssml "<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='https://www.w3.org/2001/mstts' xml:lang='en-US'><voice name='en-US-JennyNeural'><mstts:express-as style='excited'>I'm excited to try text to speech</mstts:express-as></voice></speak>"
39+
```
4040

41-
Run this command for information about additional speech synthesis options such as file input and output:
42-
```console
43-
spx help synthesize
44-
```
41+
- Run this command for information about more speech synthesis options such as file input and output:
42+
43+
```console
44+
spx help synthesize
45+
```
4546

4647
## Clean up resources
4748

articles/ai-services/speech-service/includes/quickstarts/text-to-speech-basics/cpp.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: cognitive-services
44
ms.topic: include
5-
ms.date: 09/27/2022
5+
ms.date: 08/25/2023
66
ms.author: eur
77
---
88

@@ -15,7 +15,8 @@ ms.author: eur
1515
[!INCLUDE [Prerequisites](../../common/azure-prerequisites.md)]
1616

1717
## Set up the environment
18-
The Speech SDK is available as a [NuGet package](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech) and implements .NET Standard 2.0. You install the Speech SDK later in this guide, but first check the [SDK installation guide](../../../quickstarts/setup-platform.md?pivots=programming-language-cpp) for any more requirements.
18+
19+
The Speech SDK is available as a [NuGet package](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech) that implements .NET Standard 2.0. Install the Speech SDK later in this guide. For any requirements, see [Install the Speech SDK](../../../quickstarts/setup-platform.md?pivots=programming-language-cpp).
1920

2021
### Set environment variables
2122

@@ -25,13 +26,15 @@ The Speech SDK is available as a [NuGet package](https://www.nuget.org/packages/
2526

2627
Follow these steps to create a new console application and install the Speech SDK.
2728

28-
1. Create a new C++ console project in Visual Studio Community 2022 named `SpeechSynthesis`.
29+
1. Create a C++ console project in [Visual Studio Community](https://visualstudio.microsoft.com/downloads/) named `SpeechSynthesis`.
2930
1. Install the Speech SDK in your new project with the NuGet package manager.
30-
```powershell
31-
Install-Package Microsoft.CognitiveServices.Speech
32-
```
33-
1. Replace the contents of `SpeechSynthesis.cpp` with the following code:
34-
31+
32+
```powershell
33+
Install-Package Microsoft.CognitiveServices.Speech
34+
```
35+
36+
1. Replace the contents of *SpeechSynthesis.cpp* with the following code:
37+
3538
```cpp
3639
#include <iostream>
3740
#include <stdlib.h>
@@ -108,26 +111,28 @@ Follow these steps to create a new console application and install the Speech SD
108111
}
109112
```
110113

111-
1. To change the speech synthesis language, replace `en-US-JennyNeural` with another [supported voice](~/articles/ai-services/speech-service/language-support.md#prebuilt-neural-voices). All neural voices are multilingual and fluent in their own language and English. For example, if the input text in English is "I'm excited to try text to speech" and you set `es-ES-ElviraNeural`, the text is spoken in English with a Spanish accent. If the voice does not speak the language of the input text, the Speech service won't output synthesized audio.
114+
1. To change the speech synthesis language, replace `en-US-JennyNeural` with another [supported voice](~/articles/ai-services/speech-service/language-support.md#prebuilt-neural-voices).
115+
116+
All neural voices are multilingual and fluent in their own language and English. For example, if the input text in English is "I'm excited to try text to speech" and you set `es-ES-ElviraNeural`, the text is spoken in English with a Spanish accent. If the voice doesn't speak the language of the input text, the Speech service doesn't output synthesized audio.
112117

113-
[Build and run your new console application](/cpp/build/vscpp-step-2-build) to start speech synthesis to the default speaker.
118+
1. [Build and run your new console application](/cpp/build/vscpp-step-2-build) to start speech synthesis to the default speaker.
114119

115-
> [!IMPORTANT]
116-
> Make sure that you set the `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.
120+
> [!IMPORTANT]
121+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` environment variables as described in [Set environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
117122
118-
Enter some text that you want to speak. For example, type "I'm excited to try text to speech." Press the Enter key to hear the synthesized speech.
123+
1. Enter some text that you want to speak. For example, type *I'm excited to try text to speech*. Select the **Enter** key to hear the synthesized speech.
119124

120-
```console
121-
Enter some text that you want to speak >
122-
I'm excited to try text to speech
123-
```
125+
```console
126+
Enter some text that you want to speak >
127+
I'm excited to try text to speech
128+
```
124129

125130
## Remarks
126-
Now that you've completed the quickstart, here are some additional considerations:
127131

128132
This quickstart uses the `SpeakTextAsync` operation to synthesize a short block of text that you enter. You can also get text from files as described in these guides:
129-
- For information about speech synthesis from a file and finer control over voice styles, prosody, and other settings, see [How to synthesize speech](~/articles/ai-services/speech-service/how-to-speech-synthesis.md) and [Improve synthesis with Speech Synthesis Markup Language (SSML)](~/articles/ai-services/speech-service/speech-synthesis-markup.md).
130-
- For information about synthesizing long-form text to speech, see [batch synthesis](~/articles/ai-services/speech-service/batch-synthesis.md).
133+
134+
- For information about speech synthesis from a file and finer control over voice styles, prosody, and other settings, see [How to synthesize speech](~/articles/ai-services/speech-service/how-to-speech-synthesis.md) and [Speech Synthesis Markup Language (SSML) overview](~/articles/ai-services/speech-service/speech-synthesis-markup.md).
135+
- For information about synthesizing long-form text to speech, see [Batch synthesis API for text to speech](~/articles/ai-services/speech-service/batch-synthesis.md).
131136

132137
## Clean up resources
133138

articles/ai-services/speech-service/includes/quickstarts/text-to-speech-basics/csharp.md

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: cognitive-services
44
ms.topic: include
5-
ms.date: 03/15/2022
5+
ms.date: 08/25/2023
66
ms.author: eur
77
---
88

@@ -15,7 +15,8 @@ ms.author: eur
1515
[!INCLUDE [Prerequisites](../../common/azure-prerequisites.md)]
1616

1717
## Set up the environment
18-
The Speech SDK is available as a [NuGet package](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech) and implements .NET Standard 2.0. You install the Speech SDK later in this guide, but first check the [SDK installation guide](../../../quickstarts/setup-platform.md?pivots=programming-language-csharp) for any more requirements.
18+
19+
The Speech SDK is available as a [NuGet package](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech) that implements .NET Standard 2.0. Install the Speech SDK later in this guide. For any requirements, see [Install the Speech SDK](../../../quickstarts/setup-platform.md?pivots=programming-language-csharp).
1920

2021
### Set environment variables
2122

@@ -25,16 +26,20 @@ The Speech SDK is available as a [NuGet package](https://www.nuget.org/packages/
2526

2627
Follow these steps to create a new console application and install the Speech SDK.
2728

28-
1. Open a command prompt where you want the new project, and create a console application with the .NET CLI. The `Program.cs` file should be created in the project directory.
29-
```dotnetcli
30-
dotnet new console
31-
```
29+
1. Open a command prompt where you want the new project. Run this command to create a console application with the .NET CLI. The command creates a *Program.cs* file in the project directory.
30+
31+
```dotnetcli
32+
dotnet new console
33+
```
34+
3235
1. Install the Speech SDK in your new project with the .NET CLI.
33-
```dotnetcli
34-
dotnet add package Microsoft.CognitiveServices.Speech
35-
```
36-
1. Replace the contents of `Program.cs` with the following code.
37-
36+
37+
```dotnetcli
38+
dotnet add package Microsoft.CognitiveServices.Speech
39+
```
40+
41+
1. Replace the contents of *Program.cs* with the following code.
42+
3843
```csharp
3944
using System;
4045
using System.IO;
@@ -94,30 +99,32 @@ Follow these steps to create a new console application and install the Speech SD
9499
}
95100
```
96101

97-
1. To change the speech synthesis language, replace `en-US-JennyNeural` with another [supported voice](~/articles/ai-services/speech-service/language-support.md#prebuilt-neural-voices). All neural voices are multilingual and fluent in their own language and English. For example, if the input text in English is "I'm excited to try text to speech" and you set `es-ES-ElviraNeural`, the text is spoken in English with a Spanish accent. If the voice does not speak the language of the input text, the Speech service won't output synthesized audio.
102+
1. To change the speech synthesis language, replace `en-US-JennyNeural` with another [supported voice](~/articles/ai-services/speech-service/language-support.md#prebuilt-neural-voices).
98103

99-
[Build and run](/cpp/build/vscpp-step-2-build) your new console application to start speech synthesis to the default speaker.
104+
All neural voices are multilingual and fluent in their own language and English. For example, if the input text in English is "I'm excited to try text to speech" and you set `es-ES-ElviraNeural`, the text is spoken in English with a Spanish accent. If the voice doesn't speak the language of the input text, the Speech service doesn't output synthesized audio.
100105

101-
```console
102-
dotnet run
103-
```
106+
1. Run your new console application to start speech synthesis to the default speaker.
104107

105-
> [!IMPORTANT]
106-
> Make sure that you set the `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.
108+
```console
109+
dotnet run
110+
```
107111

108-
Enter some text that you want to speak. For example, type "I'm excited to try text to speech." Press the Enter key to hear the synthesized speech.
112+
> [!IMPORTANT]
113+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` environment variables as described in [Set environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
109114
110-
```console
111-
Enter some text that you want to speak >
112-
I'm excited to try text to speech
113-
```
115+
1. Enter some text that you want to speak. For example, type *I'm excited to try text to speech*. Select the **Enter** key to hear the synthesized speech.
116+
117+
```console
118+
Enter some text that you want to speak >
119+
I'm excited to try text to speech
120+
```
114121

115122
## Remarks
116-
Now that you've completed the quickstart, here are some additional considerations:
117123

118124
This quickstart uses the `SpeakTextAsync` operation to synthesize a short block of text that you enter. You can also get text from files as described in these guides:
119-
- For information about speech synthesis from a file and finer control over voice styles, prosody, and other settings, see [How to synthesize speech](~/articles/ai-services/speech-service/how-to-speech-synthesis.md) and [Improve synthesis with Speech Synthesis Markup Language (SSML)](~/articles/ai-services/speech-service/speech-synthesis-markup.md).
120-
- For information about synthesizing long-form text to speech, see [batch synthesis](~/articles/ai-services/speech-service/batch-synthesis.md).
125+
126+
- For information about speech synthesis from a file and finer control over voice styles, prosody, and other settings, see [How to synthesize speech](~/articles/ai-services/speech-service/how-to-speech-synthesis.md) and [Speech Synthesis Markup Language (SSML) overview](~/articles/ai-services/speech-service/speech-synthesis-markup.md).
127+
- For information about synthesizing long-form text to speech, see [Batch synthesis API for text to speech](~/articles/ai-services/speech-service/batch-synthesis.md).
121128

122129
## Clean up resources
123130

articles/ai-services/speech-service/includes/quickstarts/text-to-speech-basics/go.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: cognitive-services
44
ms.topic: include
5-
ms.date: 03/15/2022
5+
ms.date: 08/25/2023
66
ms.author: eur
77
---
88

@@ -16,18 +16,18 @@ ms.author: eur
1616

1717
## Set up the environment
1818

19-
Install the [Speech SDK for Go](../../../quickstarts/setup-platform.md?pivots=programming-language-go&tabs=dotnet%252cwindows%252cjre%252cbrowser). Check the [SDK installation guide](../../../quickstarts/setup-platform.md?pivots=programming-language-go) for any more requirements.
19+
Install the Speech SDK for Go. For requirements and instructions, see [Install the Speech SDK](../../../quickstarts/setup-platform.md?pivots=programming-language-go).
2020

2121
### Set environment variables
2222

2323
[!INCLUDE [Environment variables](../../common/environment-variables.md)]
2424

2525
## Synthesize to speaker output
2626

27-
Follow these steps to create a new GO module.
27+
Follow these steps to create a new Go module.
2828

29-
1. Open a command prompt where you want the new module, and create a new file named `speech-synthesis.go`.
30-
1. Copy the following code into `speech_synthesis.go`:
29+
1. Open a console window where you want the new module, and then create a new file named *speech-synthesis.go*.
30+
1. Copy the following code into *speech-synthesis.go*:
3131

3232
```go
3333
package main
@@ -134,24 +134,26 @@ Follow these steps to create a new GO module.
134134
}
135135
```
136136

137-
1. To change the speech synthesis language, replace `en-US-JennyNeural` with another [supported voice](~/articles/ai-services/speech-service/language-support.md#prebuilt-neural-voices). All neural voices are multilingual and fluent in their own language and English. For example, if the input text in English is "I'm excited to try text to speech" and you set `es-ES-ElviraNeural`, the text is spoken in English with a Spanish accent. If the voice does not speak the language of the input text, the Speech service won't output synthesized audio.
137+
1. To change the speech synthesis language, replace `en-US-JennyNeural` with another [supported voice](~/articles/ai-services/speech-service/language-support.md#prebuilt-neural-voices).
138138

139-
Run the following commands to create a `go.mod` file that links to components hosted on GitHub:
139+
All neural voices are multilingual and fluent in their own language and English. For example, if the input text in English is "I'm excited to try text to speech" and you set `es-ES-ElviraNeural`, the text is spoken in English with a Spanish accent. If the voice doesn't speak the language of the input text, the Speech service doesn't output synthesized audio.
140140

141-
```cmd
142-
go mod init speech-synthesis
143-
go get github.com/Microsoft/cognitive-services-speech-sdk-go
144-
```
141+
1. Run the following commands to create a *go.mod* file that links to components hosted on GitHub:
145142

146-
> [!IMPORTANT]
147-
> Make sure that you set the `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.
143+
```console
144+
go mod init speech-synthesis
145+
go get github.com/Microsoft/cognitive-services-speech-sdk-go
146+
```
148147

149-
Now build and run the code:
148+
> [!IMPORTANT]
149+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` environment variables as described in [Set environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
150150
151-
```cmd
152-
go build
153-
go run speech-synthesis
154-
```
151+
1. Now build and run the code:
152+
153+
```console
154+
go build
155+
go run speech-synthesis
156+
```
155157
156158
## Clean up resources
157159

articles/ai-services/speech-service/includes/quickstarts/text-to-speech-basics/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
author: eric-urban
33
ms.service: cognitive-services
44
ms.topic: include
5-
ms.date: 06/06/2023
5+
ms.date: 08/25/2023
66
ms.author: eur
77
---
88

9-
In this quickstart, you run an application that does text to speech synthesis.
9+
In this quickstart, you run an application that does text to speech synthesis.
1010

1111
> [!TIP]
1212
> You can try text to speech in the [Speech Studio Voice Gallery](https://aka.ms/speechstudio/voicegallery) without signing up or writing any code.

0 commit comments

Comments
 (0)