Skip to content

Commit d852559

Browse files
committed
Added file, as GitHub prevents raw binary downloads
1 parent 14aef13 commit d852559

File tree

7 files changed

+37
-34
lines changed

7 files changed

+37
-34
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.author: wolfma
1616
Before you get started, make sure to:
1717

1818
> [!div class="checklist"]
19-
> * [Create an Azure Speech Resource](../../../../get-started.md)
19+
> * [Create an Azure Speech resource](../../../../get-started.md)
2020
> * [Setup your development environment](../../../../quickstarts/setup-platform.md?tabs=linux)
2121
> * [Create an empty sample project](../../../../quickstarts/create-project.md?tabs=linux)
2222

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.author: wolfma
1616
Before you get started, make sure to:
1717

1818
> [!div class="checklist"]
19-
> * [Create an Azure Speech Resource](../../../../get-started.md)
19+
> * [Create an Azure Speech resource](../../../../get-started.md)
2020
> * [Setup your development environment](../../../../quickstarts/setup-platform.md?tabs=macos)
2121
> * [Create an empty sample project](../../../../quickstarts/create-project.md?tabs=macos)
2222

articles/cognitive-services/Speech-Service/includes/quickstarts/from-file/cpp/windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.author: wolfma61
1616
Before you get started, make sure to:
1717

1818
> [!div class="checklist"]
19-
> * [Create an Azure Speech Resource](../../../../get-started.md)
19+
> * [Create an Azure Speech resource](../../../../get-started.md)
2020
> * [Setup your development environment](../../../../quickstarts/setup-platform.md?tabs=windows)
2121
> * [Create an empty sample project](../../../../quickstarts/create-project.md?tabs=windows)
2222

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.author: dapine
1616
Before you get started, make sure to:
1717

1818
> [!div class="checklist"]
19-
> * [Create an Azure Speech Resource](../../../../get-started.md)
19+
> * [Create an Azure Speech resource](../../../../get-started.md)
2020
> * [Setup your development environment](../../../../quickstarts/setup-platform.md?tabs=dotnet)
2121
> * [Create an empty sample project](../../../../quickstarts/create-project.md?tabs=vs)
2222
@@ -28,7 +28,7 @@ The first step is to make sure that you have your project open in Visual Studio.
2828

2929
1. Launch Visual Studio 2019.
3030
2. Load your project and open `Program.cs`.
31-
3. Download the <a href="https://raw.githubusercontent.com/Azure-Samples/cognitive-services-speech-sdk/master/samples/csharp/sharedcontent/console/whatstheweatherlike.wav" download>whatstheweatherlike.wav <span class="docon docon-download x-hidden-focus"></span></a> and add it to your project.
31+
3. Download the <a href="/whatstheweatherlike.wav" download="whatstheweatherlike.wav" target="_blank">whatstheweatherlike.wav <span class="docon docon-download x-hidden-focus"></span></a> and add it to your project.
3232
- Save the *whatstheweatherlike.wav* file next to the `Program.cs` file.
3333
- From the **Solution Explorer** right-click on the project, select **Add > Existing item**.
3434
- Select the *whatstheweatherlike.wav* file, then select the **Add** button.

articles/cognitive-services/Speech-Service/includes/quickstarts/from-file/header.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
title: "Quickstart: Recognize speech from an audio file - Speech service"
33
titleSuffix: Azure Cognitive Services
44
services: cognitive-services
5-
author: erhopf
5+
author: IEvangelist
66
manager: nitinme
77
ms.service: cognitive-services
88
ms.subservice: speech-service
99
ms.topic: include
10-
ms.date: 10/28/2019
11-
ms.author: erhopf
10+
ms.date: 01/14/2020
11+
ms.author: dapine
1212
---
1313

14-
In this quickstart you will use the [Speech SDK](~/articles/cognitive-services/speech-service/speech-sdk.md) to recognize speech from an audio file. After satisfying a few prerequisites, recognizing speech from a file only takes five steps:
14+
In this quickstart you will use the [Speech SDK](~/articles/cognitive-services/speech-service/speech-sdk.md) to recognize speech from an audio file. After satisfying a few prerequisites, recognizing speech from a file only takes a few steps:
1515
> [!div class="checklist"]
16-
> * Create a ````SpeechConfig```` object from your subscription key and region.
17-
> * Create an ````AudioConfig```` object that specifies the .WAV file name.
18-
> * Create a ````SpeechRecognizer```` object using the ````SpeechConfig```` and ````AudioConfig```` objects from above.
19-
> * Using the ````SpeechRecognizer```` object, start the recognition process for a single utterance.
20-
> * Inspect the ````SpeechRecognitionResult```` returned.
16+
> * Create a `SpeechConfig` object from your subscription key and region.
17+
> * Create an `AudioConfig` object that specifies the .WAV file name.
18+
> * Create a `SpeechRecognizer` object using the `SpeechConfig` and `AudioConfig` objects from above.
19+
> * Using the `SpeechRecognizer` object, start the recognition process for a single utterance.
20+
> * Inspect the `SpeechRecognitionResult` returned.

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

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
author: erhopf
33
ms.service: cognitive-services
44
ms.topic: include
5-
ms.date: 12/17/2019
5+
ms.date: 01/14/2020
66
ms.author: erhopf
77
---
88

99
## Prerequisites
1010

1111
> [!div class="checklist"]
12-
> * [Create an Azure Speech Resource](../../../../get-started.md)
12+
> * [Create an Azure Speech resource](../../../../get-started.md)
1313
> * [Setup your development environment](../../../../quickstarts/setup-platform.md?tabs=jre)
1414
> * [Create an empty sample project](../../../../quickstarts/create-project.md?tabs=jre)
1515
@@ -25,8 +25,7 @@ ms.author: erhopf
2525

2626
1. Replace all code in `Main.java` with the following snippet:
2727

28-
```Java
29-
28+
```java
3029
package speechsdk.quickstart;
3130

3231
import java.util.concurrent.Future;
@@ -67,22 +66,26 @@ ms.author: erhopf
6766
SpeechRecognitionResult result = task.get();
6867
assert(result != null);
6968

70-
if (result.getReason() == ResultReason.RecognizedSpeech) {
71-
System.out.println("We recognized: " + result.getText());
72-
exitCode = 0;
73-
}
74-
else if (result.getReason() == ResultReason.NoMatch) {
75-
System.out.println("NOMATCH: Speech could not be recognized.");
76-
}
77-
else if (result.getReason() == ResultReason.Canceled) {
78-
CancellationDetails cancellation = CancellationDetails.fromResult(result);
79-
System.out.println("CANCELED: Reason=" + cancellation.getReason());
80-
81-
if (cancellation.getReason() == CancellationReason.Error) {
82-
System.out.println("CANCELED: ErrorCode=" + cancellation.getErrorCode());
83-
System.out.println("CANCELED: ErrorDetails=" + cancellation.getErrorDetails());
84-
System.out.println("CANCELED: Did you update the subscription info?");
85-
}
69+
switch (result.getReason()) {
70+
case ResultReason.RecognizedSpeech: {
71+
System.out.println("We recognized: " + result.getText());
72+
exitCode = 0;
73+
}
74+
break;
75+
case ResultReason.NoMatch:
76+
System.out.println("NOMATCH: Speech could not be recognized.");
77+
break;
78+
case ResultReason.Canceled: {
79+
CancellationDetails cancellation = CancellationDetails.fromResult(result);
80+
System.out.println("CANCELED: Reason=" + cancellation.getReason());
81+
82+
if (cancellation.getReason() == CancellationReason.Error) {
83+
System.out.println("CANCELED: ErrorCode=" + cancellation.getErrorCode());
84+
System.out.println("CANCELED: ErrorDetails=" + cancellation.getErrorDetails());
85+
System.out.println("CANCELED: Did you update the subscription info?");
86+
}
87+
}
88+
break;
8689
}
8790

8891
reco.close();

0 commit comments

Comments
 (0)