Skip to content

Commit 40616d3

Browse files
committed
Fixed C++ quickstarts too
1 parent ae2b4ab commit 40616d3

File tree

7 files changed

+44
-93
lines changed

7 files changed

+44
-93
lines changed

articles/cognitive-services/Speech-Service/includes/quickstarts/from-microphone/cpp/footer.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

articles/cognitive-services/Speech-Service/includes/quickstarts/from-microphone/cpp/linux.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
11
---
2-
title: 'Quickstart: Recognize speech from a microphone, C++ (Linux) - Speech service'
3-
titleSuffix: Azure Cognitive Services
4-
services: cognitive-services
5-
author: wolfma61
6-
manager: nitinme
2+
author: IEvangelist
73
ms.service: cognitive-services
8-
ms.subservice: speech-service
94
ms.topic: include
10-
ms.date: 12/17/2019
11-
ms.author: wolfma
5+
ms.date: 04/03/2020
6+
ms.author: dapine
127
---
138

149
## Prerequisites
1510

1611
Before you get started:
1712

1813
> [!div class="checklist"]
19-
> * [Create an Azure Speech Resource](../../../../get-started.md)
14+
> * <a href="https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesSpeechServices" target="_blank">Create an Azure Speech resource <span class="docon docon-navigate-external x-hidden-focus"></span></a>
2015
> * [Setup your development environment and create an empty project](../../../../quickstarts/setup-platform.md?tabs=linux)
2116
> * Make sure that you have access to a microphone for audio capture
2217
23-
## Add sample code
18+
## Source code
2419

25-
1. Create a C++ source file named `helloworld.cpp`, and paste the following code into it.
20+
Create a C++ source file named `helloworld.cpp`, and paste the following code into it.
2621

27-
[!code-cpp[Quickstart Code](~/samples-cognitive-services-speech-sdk/quickstart/cpp/linux/from-microphone/helloworld.cpp#code)]
22+
[!code-cpp[Quickstart Code](~/samples-cognitive-services-speech-sdk/quickstart/cpp/linux/from-microphone/helloworld.cpp#code)]
2823

29-
1. In this new file, replace the string `YourSubscriptionKey` with your Speech service subscription key.
24+
[!INCLUDE [replace key and region](../replace-key-and-region.md)]
3025

31-
1. Replace the string `YourServiceRegion` with the **Region identifier** from [region](https://aka.ms/speech/sdkregion) associated with your subscription (for example, `westus` for the free trial subscription).
26+
## Code explanation
3227

33-
> [!NOTE]
34-
> The Speech SDK will default to recognizing using en-us for the language, see [Specify source language for speech to text](../../../../how-to-specify-source-language.md) for information on choosing the source language.
28+
[!INCLUDE [code explanation](../code-explanation.md)]
3529

3630
## Build the app
3731

@@ -93,4 +87,4 @@ Before you get started:
9387
9488
## Next steps
9589
96-
[!INCLUDE [footer](./footer.md)]
90+
[!INCLUDE [footer](../footer.md)]

articles/cognitive-services/Speech-Service/includes/quickstarts/from-microphone/cpp/macos.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
11
---
2-
title: 'Quickstart: Recognize speech from a microphone, C++ (macOS) - Speech service'
3-
titleSuffix: Azure Cognitive Services
4-
services: cognitive-services
5-
author: wolfma61
6-
manager: nitinme
2+
author: IEvangelist
73
ms.service: cognitive-services
8-
ms.subservice: speech-service
94
ms.topic: include
10-
ms.date: 12/17/2019
11-
ms.author: wolfma
5+
ms.date: 04/03/2020
6+
ms.author: dapine
127
---
138

149
## Prerequisites
1510

1611
Before you get started:
1712

1813
> [!div class="checklist"]
19-
> * [Create an Azure Speech Resource](../../../../get-started.md)
14+
> * <a href="https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesSpeechServices" target="_blank">Create an Azure Speech resource <span class="docon docon-navigate-external x-hidden-focus"></span></a>
2015
> * [Setup your development environment and create an empty project](../../../../quickstarts/setup-platform.md?tabs=macos)
2116
> * Make sure that you have access to a microphone for audio capture
2217
23-
## Add sample code
18+
## Source code
2419

25-
1. Create a C++ source file named `helloworld.cpp`, and paste the following code into it.
20+
Create a C++ source file named *helloworld.cpp*, and paste the following code into it.
2621

27-
[!code-cpp[Quickstart Code](~/samples-cognitive-services-speech-sdk/quickstart/cpp/macos/from-microphone/helloworld.cpp#code)]
22+
[!code-cpp[Quickstart Code](~/samples-cognitive-services-speech-sdk/quickstart/cpp/macos/from-microphone/helloworld.cpp#code)]
2823

29-
1. In this new file, replace the string `YourSubscriptionKey` with your Speech service subscription key.
24+
[!INCLUDE [replace key and region](../replace-key-and-region.md)]
3025

31-
1. Replace the string `YourServiceRegion` with the **Region identifier** from [region](https://aka.ms/speech/sdkregion) associated with your subscription (for example, `westus` for the free trial subscription).
26+
## Code explanation
3227

33-
> [!NOTE]
34-
> The Speech SDK will default to recognizing using en-us for the language, see [Specify source language for speech to text](../../../../how-to-specify-source-language.md) for information on choosing the source language.
28+
[!INCLUDE [code explanation](../code-explanation.md)]
3529

3630
## Build the app
3731

@@ -67,4 +61,4 @@ Before you get started:
6761
6862
## Next steps
6963
70-
[!INCLUDE [footer](./footer.md)]
64+
[!INCLUDE [footer](../footer.md)]
Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,31 @@
11
---
2-
title: 'Quickstart: Recognize speech from a microphone, C++ (Windows) - Speech service'
3-
titleSuffix: Azure Cognitive Services
4-
description: Learn how to recognize speech in C++ on Windows Desktop by using the Speech SDK
5-
services: cognitive-services
6-
author: wolfma61
7-
manager: nitinme
2+
author: IEvangelist
83
ms.service: cognitive-services
9-
ms.subservice: speech-service
104
ms.topic: include
11-
ms.date: 12/17/2019
12-
ms.author: wolfma
5+
ms.date: 04/03/2020
6+
ms.author: dapine
137
---
148

159
## Prerequisites
1610

1711
Before you get started:
1812

1913
> [!div class="checklist"]
20-
> * [Create an Azure Speech Resource](../../../../get-started.md)
14+
> * <a href="https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesSpeechServices" target="_blank">Create an Azure Speech resource <span class="docon docon-navigate-external x-hidden-focus"></span></a>
2115
> * [Setup your development environment and create an empty project](../../../../quickstarts/setup-platform.md?tabs=windows)
2216
> * Make sure that you have access to a microphone for audio capture
2317
2418
## Add sample code
2519

26-
1. Open the source file **helloworld.cpp**.
20+
Create a C++ source file named *helloworld.cpp*, and paste the following code into it.
2721

28-
1. Replace all the code with the following snippet:
22+
[!code-cpp[Quickstart Code](~/samples-cognitive-services-speech-sdk/quickstart/cpp/windows/from-microphone/helloworld/helloworld.cpp#code)]
2923

30-
[!code-cpp[Quickstart Code](~/samples-cognitive-services-speech-sdk/quickstart/cpp/windows/from-microphone/helloworld/helloworld.cpp#code)]
24+
[!INCLUDE [replace key and region](../replace-key-and-region.md)]
3125

32-
1. In the same file, replace the string `YourSubscriptionKey` with your subscription key.
26+
## Code explanation
3327

34-
1. Replace the string `YourServiceRegion` with the **Region identifier** from [region](https://aka.ms/speech/sdkregion) associated with your subscription (for example, `westus` for the free trial subscription).
35-
36-
1. From the menu bar, choose **File** > **Save All**.
37-
38-
> [!NOTE]
39-
> The Speech SDK will default to recognizing using en-us for the language, see [Specify source language for speech to text](../../../../how-to-specify-source-language.md) for information on choosing the source language.
28+
[!INCLUDE [code explanation](../code-explanation.md)]
4029

4130
## Build and run the application
4231

@@ -50,4 +39,4 @@ Before you get started:
5039

5140
## Next steps
5241

53-
[!INCLUDE [footer](./footer.md)]
42+
[!INCLUDE [footer](../footer.md)]

articles/cognitive-services/Speech-Service/includes/quickstarts/from-microphone/csharp/dotnet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: IEvangelist
33
ms.service: cognitive-services
44
ms.topic: include
5-
ms.date: 04/02/2020
5+
ms.date: 04/03/2020
66
ms.author: dapine
77
---
88

@@ -22,7 +22,7 @@ The first step is to make sure that you have your project open in Visual Studio.
2222
1. Launch **Visual Studio 2019**.
2323
2. Load your project and open *Program.cs*.
2424

25-
## Update source code
25+
## Source code
2626

2727
Replace the contents of the *Program.cs* file with the following C# code.
2828

articles/cognitive-services/Speech-Service/includes/quickstarts/from-microphone/java/jre.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,21 @@ Before you get started:
1515
> * [Setup your development environment and create an empty project](../../../../quickstarts/setup-platform.md?tabs=jre)
1616
> * Make sure that you have access to a microphone for audio capture
1717
18-
## Add sample code
18+
## Source code
1919

20-
1. To add a new empty class to your Java project, select **File** > **New** > **Class**.
20+
To add a new empty class to your Java project, select **File** > **New** > **Class**. In the **New Java Class** window, enter **speechsdk.quickstart** into the **Package** field, and **Main** into the **Name** field.
2121

22-
1. In the **New Java Class** window, enter **speechsdk.quickstart** into the **Package** field, and **Main** into the **Name** field.
22+
![Screenshot of New Java Class window](~/articles/cognitive-services/Speech-Service/media/sdk/qs-java-jre-06-create-main-java.png)
2323

24-
![Screenshot of New Java Class window](~/articles/cognitive-services/Speech-Service/media/sdk/qs-java-jre-06-create-main-java.png)
24+
Replace the contents of the *Main.java* file with the following snippet:
2525

26-
1. Replace all code in `Main.java` with the following snippet:
26+
[!code-java[Quickstart Code](~/samples-cognitive-services-speech-sdk/quickstart/java/jre/from-microphone/src/speechsdk/quickstart/Main.java#code)]
2727

28-
[!code-java[Quickstart Code](~/samples-cognitive-services-speech-sdk/quickstart/java/jre/from-microphone/src/speechsdk/quickstart/Main.java#code)]
28+
[!INCLUDE [replace key and region](../replace-key-and-region.md)]
2929

30-
1. Replace the string `YourSubscriptionKey` with your subscription key.
30+
## Code explanation
3131

32-
1. Replace the string `YourServiceRegion` with the **Region identifier** from [region](https://aka.ms/speech/sdkregion) associated with your subscription (for example, `westus` for the free trial subscription).
33-
34-
1. Save changes to the project.
35-
36-
> [!NOTE]
37-
> The Speech SDK will default to recognizing using en-us for the language, see [Specify source language for speech to text](../../../../how-to-specify-source-language.md) for information on choosing the source language.
32+
[!INCLUDE [code explanation](../code-explanation.md)]
3833

3934
## Build and run the app
4035

articles/cognitive-services/Speech-Service/includes/quickstarts/from-microphone/python/python.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
---
2-
title: 'Quickstart: Recognize speech from a microphone, Python - Speech service'
3-
titleSuffix: Azure Cognitive Services
4-
description: Use this guide to create a speech-to-text console application that uses the Speech SDK for Python. When finished, you can use your computer's microphone to transcribe speech to text in real time.
5-
services: cognitive-services
62
author: IEvangelist
7-
manager: nitinme
83
ms.service: cognitive-services
9-
ms.subservice: speech-service
104
ms.topic: include
11-
ms.date: 04/02/2020
5+
ms.date: 04/03/2020
126
ms.author: dapine
137
---
148

@@ -21,7 +15,7 @@ Before you get started:
2115
> * [Setup your development environment and create an empty project](../../../../quickstarts/setup-platform.md)
2216
> * Make sure that you have access to a microphone for audio capture
2317
24-
## Update source code
18+
## Source code
2519

2620
Create a file named *quickstart.py* and paste the following Python code in it.
2721

0 commit comments

Comments
 (0)