Skip to content

Commit f5113f1

Browse files
Merge pull request #264372 from TimShererWithAquent/us200722b
Freshness update: Azure AI Speech service
2 parents ef0828d + e447597 commit f5113f1

File tree

10 files changed

+45
-43
lines changed

10 files changed

+45
-43
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
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 formats, and custom configuration options.
4+
description: In this quickstart, you create an app that converts text to speech. Learn about supported audio formats and custom configuration options.
55
author: eric-urban
66
manager: nitinme
77
ms.service: azure-ai-speech
88
ms.topic: quickstart
9-
ms.date: 08/25/2023
9+
ms.date: 01/29/2024
1010
ms.author: eur
1111
ms.devlang: cpp
1212
# ms.devlang: cpp, csharp, golang, java, javascript, objective-c, python
1313
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
1414
zone_pivot_groups: programming-languages-speech-services
1515
keywords: text to speech
16+
#customer intent: As a user, I want to create speech output from text by using my choice of technologies which fit into my current processes.
1617
---
1718

1819
# Quickstart: Convert text to speech
@@ -57,7 +58,7 @@ keywords: text to speech
5758
[!INCLUDE [CLI include](includes/quickstarts/text-to-speech-basics/cli.md)]
5859
::: zone-end
5960

60-
## Next steps
61+
## Next step
6162

6263
> [!div class="nextstepaction"]
6364
> [Learn more about speech synthesis](how-to-speech-synthesis.md)

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
5-
ms.date: 08/25/2023
5+
ms.date: 01/29/2024
66
ms.author: eur
77
---
88

@@ -24,14 +24,9 @@ The Speech SDK is available as a [NuGet package](https://www.nuget.org/packages/
2424

2525
## Synthesize to speaker output
2626

27-
Follow these steps to create a new console application and install the Speech SDK.
27+
Follow these steps to create a console application and install the Speech SDK.
2828

2929
1. Create a C++ console project in [Visual Studio Community](https://visualstudio.microsoft.com/downloads/) named `SpeechSynthesis`.
30-
1. Install the Speech SDK in your new project with the NuGet package manager.
31-
32-
```powershell
33-
Install-Package Microsoft.CognitiveServices.Speech
34-
```
3530

3631
1. Replace the contents of *SpeechSynthesis.cpp* with the following code:
3732

@@ -111,14 +106,20 @@ Follow these steps to create a new console application and install the Speech SD
111106
}
112107
```
113108

109+
1. Select **Tools** > **Nuget Package Manager** > **Package Manager Console**. In the **Package Manager Console**, run this command:
110+
111+
```console
112+
Install-Package Microsoft.CognitiveServices.Speech
113+
```
114+
114115
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).
115116

116117
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.
117118

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

120121
> [!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.
122+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
122123

123124
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.
124125

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
5-
ms.date: 08/25/2023
5+
ms.date: 01/29/2024
66
ms.author: eur
77
---
88

@@ -24,14 +24,16 @@ The Speech SDK is available as a [NuGet package](https://www.nuget.org/packages/
2424

2525
## Synthesize to speaker output
2626

27-
Follow these steps to create a new console application and install the Speech SDK.
27+
Follow these steps to create a console application and install the Speech SDK.
2828

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.
29+
1. Open a command prompt window in the folder where you want the new project. Run this command to create a console application with the .NET CLI.
3030

3131
```dotnetcli
3232
dotnet new console
3333
```
3434

35+
The command creates a *Program.cs* file in the project directory.
36+
3537
1. Install the Speech SDK in your new project with the .NET CLI.
3638

3739
```dotnetcli
@@ -110,7 +112,7 @@ Follow these steps to create a new console application and install the Speech SD
110112
```
111113

112114
> [!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.
115+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
114116
115117
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.
116118

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
5-
ms.date: 08/25/2023
5+
ms.date: 01/29/2024
66
ms.author: eur
77
---
88

@@ -24,9 +24,9 @@ Install the Speech SDK for Go. For requirements and instructions, see [Install t
2424

2525
## Synthesize to speaker output
2626

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

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

3232
```go
@@ -146,7 +146,7 @@ Follow these steps to create a new Go module.
146146
```
147147

148148
> [!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.
149+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
150150
151151
1. Now build and run the code:
152152

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
5-
ms.date: 08/25/2023
5+
ms.date: 01/29/2024
66
ms.author: eur
77
---
88

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

1717
## Set up the environment
1818

19-
Before you can do anything, you need to [install the Speech SDK](~/articles/ai-services/speech-service/quickstarts/setup-platform.md?pivots=programming-language-java&tabs=jre). The sample in this quickstart works with the Java Runtime.
19+
To set up your environment, [install the Speech SDK](~/articles/ai-services/speech-service/quickstarts/setup-platform.md?pivots=programming-language-java&tabs=jre). The sample in this quickstart works with the Java Runtime.
2020

2121
1. Install [Apache Maven](https://maven.apache.org/install.html). Then run `mvn -v` to confirm successful installation.
22-
1. Create a new *pom.xml* file in the root of your project, and copy the following code into it:
22+
1. Create a *pom.xml* file in the root of your project, and copy the following code into it:
2323

2424
```xml
2525
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -127,7 +127,7 @@ Follow these steps to create a console application for speech recognition.
127127
```
128128

129129
> [!IMPORTANT]
130-
> 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.
130+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
131131
132132
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.
133133

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
5-
ms.date: 08/25/2023
5+
ms.date: 01/29/2024
66
ms.author: eur
77
---
88

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

1717
## Set up the environment
1818

19-
Before you can do anything, you need to install the Speech SDK for JavaScript. If you just want the package name to install, run `npm install microsoft-cognitiveservices-speech-sdk`. For guided installation instructions, see the [Install the Speech SDK](../../../quickstarts/setup-platform.md?pivots=programming-language-javascript).
19+
To set up your environment, install the Speech SDK for JavaScript. If you just want the package name to install, run `npm install microsoft-cognitiveservices-speech-sdk`. For guided installation instructions, see the [Install the Speech SDK](../../../quickstarts/setup-platform.md?pivots=programming-language-javascript).
2020

2121
### Set environment variables
2222

@@ -83,7 +83,7 @@ Follow these steps to create a Node.js console application for speech synthesis.
8383
}());
8484
```
8585

86-
1. In *SpeechSynthesis.js*, optionally you can rename *YourAudioFile.wav* to another output filename.
86+
1. In *SpeechSynthesis.js*, optionally you can rename *YourAudioFile.wav* to another output file name.
8787

8888
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).
8989

@@ -96,7 +96,7 @@ Follow these steps to create a Node.js console application for speech synthesis.
9696
```
9797

9898
> [!IMPORTANT]
99-
> 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.
99+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
100100
101101
1. The provided text should be in an audio file:
102102

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
5-
ms.date: 08/25/2023
5+
ms.date: 01/29/2024
66
ms.author: eur
77
---
88

@@ -30,7 +30,7 @@ Follow these steps to synthesize speech in a macOS application.
3030

3131
1. Clone the [Azure-Samples/cognitive-services-speech-sdk](https://github.com/Azure-Samples/cognitive-services-speech-sdk) repository to get the [Synthesize audio in Objective-C on macOS using the Speech SDK](https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/quickstart/objectivec/macos/text-to-speech) sample project. The repository also has iOS samples.
3232
1. Open the directory of the downloaded sample app (`helloworld`) in a terminal.
33-
1. Run the command `pod install`. This command generates a `helloworld.xcworkspace` Xcode workspace containing both the sample app and the Speech SDK as a dependency.
33+
1. Run the command `pod install`. This command generates a `helloworld.xcworkspace` Xcode workspace that contains both the sample app and the Speech SDK as a dependency.
3434
1. Open the `helloworld.xcworkspace` workspace in Xcode.
3535
1. Open the file named *AppDelegate.m* and locate the `buttonPressed` method as shown here.
3636

@@ -78,10 +78,10 @@ Follow these steps to synthesize speech in a macOS application.
7878
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.
7979

8080
1. To make the debug output visible, select **View** > **Debug Area** > **Activate Console**.
81-
1. Build and run the example code by selecting **Product** > **Run** from the menu or selecting the **Play** button.
81+
1. To build and run the example code, select **Product** > **Run** from the menu or select the **Play** button.
8282

8383
> [!IMPORTANT]
84-
> 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.
84+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
8585
8686
After you input some text and select the button in the app, you should hear the synthesized audio played.
8787

@@ -95,5 +95,3 @@ This quickstart uses the `SpeakText` operation to synthesize a short block of te
9595
## Clean up resources
9696

9797
[!INCLUDE [Delete resource](../../common/delete-resource.md)]
98-
99-

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
5-
ms.date: 08/25/2023
5+
ms.date: 01/29/2024
66
ms.author: eur
77
---
88

@@ -31,7 +31,7 @@ Install a version of [Python from 3.7 or later](https://www.python.org/downloads
3131

3232
Follow these steps to create a console application.
3333

34-
1. Open a command prompt where you want the new project, and create a new file named *speech_synthesis.py*.
34+
1. Open a command prompt window in the folder where you want the new project. Create a file named *speech_synthesis.py*.
3535
1. Run this command to install the Speech SDK:
3636

3737
```console
@@ -81,7 +81,7 @@ Follow these steps to create a console application.
8181
```
8282

8383
> [!IMPORTANT]
84-
> 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.
84+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
8585

8686
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.
8787

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
5-
ms.date: 08/25/2023
5+
ms.date: 01/29/2024
66
ms.author: eur
77
---
88

@@ -20,7 +20,7 @@ ms.author: eur
2020

2121
## Synthesize to a file
2222

23-
At a command prompt, run the following cURL command. Optionally, you can rename *output.mp3* to another output filename.
23+
At a command prompt, run the following cURL command. Optionally, you can rename *output.mp3* to another output file name.
2424

2525
# [Windows](#tab/windows)
2626

@@ -66,7 +66,7 @@ curl --location --request POST "https://${SPEECH_REGION}.tts.speech.microsoft.co
6666
* * *
6767

6868
> [!IMPORTANT]
69-
> 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.
69+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
7070
7171
The provided text should be output to an audio file named *output.mp3*.
7272

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
5-
ms.date: 08/25/2023
5+
ms.date: 01/29/2024
66
ms.author: eur
77
---
88

@@ -30,7 +30,7 @@ Follow these steps to synthesize speech in a macOS application.
3030

3131
1. Clone the [Azure-Samples/cognitive-services-speech-sdk](https://github.com/Azure-Samples/cognitive-services-speech-sdk) repository to get the [Synthesize audio in Swift on macOS using the Speech SDK](https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/quickstart/swift/macos/text-to-speech) sample project. The repository also has iOS samples.
3232
1. Navigate to the directory of the downloaded sample app (`helloworld`) in a terminal.
33-
1. Run the command `pod install`. This command generates a `helloworld.xcworkspace` Xcode workspace containing both the sample app and the Speech SDK as a dependency.
33+
1. Run the command `pod install`. This command generates a `helloworld.xcworkspace` Xcode workspace that contains both the sample app and the Speech SDK as a dependency.
3434
1. Open the `helloworld.xcworkspace` workspace in Xcode.
3535
1. Open the file named *AppDelegate.swift* and locate the `applicationDidFinishLaunching` and `synthesize` methods as shown here.
3636

@@ -126,10 +126,10 @@ Follow these steps to synthesize speech in a macOS application.
126126
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.
127127

128128
1. To make the debug output visible, select **View** > **Debug Area** > **Activate Console**.
129-
1. Build and run the example code by selecting **Product** > **Run** from the menu or selecting the **Play** button.
129+
1. To build and run the example code, select **Product** > **Run** from the menu or select the **Play** button.
130130

131131
> [!IMPORTANT]
132-
> 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.
132+
> Make sure that you set the `SPEECH_KEY` and `SPEECH_REGION` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
133133
134134
After you input some text and select the button in the app, you should hear the synthesized audio played.
135135

0 commit comments

Comments
 (0)