Skip to content

Commit 990e222

Browse files
authored
Merge pull request #115139 from v-demjoh/spx-qs-2
Quickstarts for SPX tool
2 parents f465794 + d03759c commit 990e222

File tree

22 files changed

+390
-29
lines changed

22 files changed

+390
-29
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "Quickstart: Recognize speech from a microphone - Speech service"
3+
titleSuffix: Azure Cognitive Services
4+
description: TBD
5+
services: cognitive-services
6+
author: v-demjoh
7+
manager: erhopf
8+
ms.service: cognitive-services
9+
ms.subservice: speech-service
10+
ms.topic: include
11+
ms.date: 5/13/2020
12+
ms.author: v-demjoh
13+
---
14+
15+
In this quickstart, you use the SPX tool from the command line to recognize speech recorded in a sound file, and produce a text transcription. It's easy to use the SPX tool to perform common recognition tasks, such as transcribing conversations. After a one-time configuration, the SPX tool lets you transcribe audio into text interactively with a microphone or from files using a batch script.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
author: v-demjoh
3+
ms.service: cognitive-services
4+
ms.topic: include
5+
ms.date: 05/13/2020
6+
ms.author: v-demjoh
7+
---
8+
9+
## Find a file that contains speech
10+
11+
The SPX tool can recognize speech in many file formats and natural languages. For this quickstart, you can use
12+
a WAV file (16kHz or 8kHz, 16-bit, and mono PCM) that contains English speech.
13+
14+
1. Download the <a href="https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/samples/csharp/sharedcontent/console/whatstheweatherlike.wav" download="whatstheweatherlike" target="_blank">whatstheweatherlike.wav <span class="docon docon-download x-hidden-focus"></span></a>.
15+
2. Copy the `whatstheweatherlike.wav` file to the same directory as the SPX tool binary file.
16+
17+
## Run the SPX tool
18+
19+
Now you're ready to run the SPX tool to recognize speech found in the sound file.
20+
21+
From the command line, change to the directory that contains the SPX tool binary file, and type:
22+
23+
```bash
24+
spx recognize --file whatstheweatherlike.wav
25+
```
26+
27+
> [!NOTE]
28+
> The SPX tool defaults to English. You can choose a different language [from the Speech-to-text table](../../../../language-support.md).
29+
> For example, add `--source de-DE` to recognize German speech.
30+
31+
The SPX tool will show a text transcription of the speech on the screen. Then the SPX tool will close.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "Quickstart: Recognize speech from a microphone - Speech service"
3+
titleSuffix: Azure Cognitive Services
4+
description: TBD
5+
services: cognitive-services
6+
author: v-demjoh
7+
manager: erhopf
8+
ms.service: cognitive-services
9+
ms.subservice: speech-service
10+
ms.topic: include
11+
ms.date: 5/13/2020
12+
ms.author: v-demjoh
13+
---
14+
15+
In this quickstart, you use the SPX tool from the command line to interactively recognize speech from a microphone input, and get the text transcription from captured audio. It's easy to use the SPX tool to perform common recognition tasks, such as transcribing conversations. After a one-time configuration, the SPX tool lets you transcribe audio into text interactively with a microphone or from files using a batch script.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
author: v-demjoh
3+
ms.service: cognitive-services
4+
ms.topic: include
5+
ms.date: 05/13/2020
6+
ms.author: v-demjoh
7+
---
8+
9+
## Enable microphone
10+
11+
Plug in and turn on your PC microphone, and turn off any apps that might also use the microphone. Some computers have a built-in microphone,
12+
while others require configuration of a Bluetooth device.
13+
14+
## Run the SPX tool
15+
16+
Now you're ready to run the SPX tool to recognize speech from your microphone.
17+
18+
1. **Start your app** - From the command line, change to the directory that contains the SPX tool binary file, and type:
19+
```bash
20+
spx recognize --microphone
21+
```
22+
23+
> [!NOTE]
24+
> The SPX tool defaults to English. You can choose a different language [from the Speech-to-text table](../../../../language-support.md).
25+
> For example, add `--source de-DE` to recognize German speech.
26+
27+
2. **Start recognition** - Speak into the microphone. You will see transcription of your words into text in real-time. The SPX tool will stop after a period of silence, or when you press ctrl-C.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
author: v-demjoh
3+
ms.service: cognitive-services
4+
ms.topic: include
5+
ms.date: 05/15/2020
6+
ms.author: v-demjoh
7+
---
8+
9+
## Next steps
10+
11+
Continue exploring the basics to learn about other features of the SPX tool.
12+
13+
> [!div class="nextstepaction"]
14+
> [Explore SPX tool basics](../../spx-basics.md)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
author: v-demjoh
3+
ms.service: cognitive-services
4+
ms.subservice: speech-service
5+
ms.topic: include
6+
ms.date: 05/18/2020
7+
ms.author: v-demjoh
8+
---
9+
10+
In this quickstart, you use the SPX tool from the command line to convert speech from a microphone input
11+
to text in multiple other languages.
12+
After a one-time configuration, the SPX tool lets you translate speech using commands from the command line.
13+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
author: v-demjoh
3+
ms.service: cognitive-services
4+
ms.subservice: speech-service
5+
ms.topic: include
6+
ms.date: 05/18/2020
7+
ms.author: v-demjoh
8+
---
9+
10+
11+
## Run the SPX tool
12+
13+
Now you're ready to run the SPX tool to translate speech into text in two different languages.
14+
15+
From the command line, change to the directory that contains the SPX tool binary file, and type:
16+
17+
```bash
18+
spx translate --microphone --target de-DE --target es-MX
19+
```
20+
21+
The SPX tool will translate natural language spoken English into text printed in German and (Mexican) Spanish.
22+
Press ENTER to stop the tool.
23+
24+
> [!NOTE]
25+
> The SPX tool defaults to English. You can choose a different language [from the Speech-to-text table](../../../../language-support.md).
26+
> For example, add `--source ja-JP` to recognize Japanese speech.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
author: v-demjoh
3+
ms.service: cognitive-services
4+
ms.subservice: speech-service
5+
ms.topic: include
6+
ms.date: 05/18/2020
7+
ms.author: v-demjoh
8+
---
9+
10+
In this quickstart, you use the SPX tool from the command line to convert speech from a microphone input
11+
to text in another language.
12+
After a one-time configuration, the SPX tool lets you translate speech using commands from the command line.
13+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
author: v-demjoh
3+
ms.service: cognitive-services
4+
ms.subservice: speech-service
5+
ms.topic: include
6+
ms.date: 05/18/2020
7+
ms.author: v-demjoh
8+
---
9+
10+
11+
## Run the SPX tool
12+
13+
Now you're ready to run the SPX tool to translate speech into text in a different language.
14+
15+
From the command line, change to the directory that contains the SPX tool binary file, and type:
16+
17+
```bash
18+
spx translate --microphone --target de-DE
19+
```
20+
21+
The SPX tool will translate natural language spoken English into text printed in German.
22+
Press ENTER to stop the tool.
23+
24+
> [!NOTE]
25+
> The SPX tool defaults to English. You can choose a different language [from the Speech-to-text table](../../../../language-support.md).
26+
> For example, add `--source ja-JP` to recognize Japanese speech.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
author: v-demjoh
3+
ms.service: cognitive-services
4+
ms.subservice: speech-service
5+
ms.topic: include
6+
ms.date: 05/18/2020
7+
ms.author: v-demjoh
8+
---
9+
10+
In this quickstart, you use the SPX tool from the command line to convert text to speech stored in an audio file.
11+
The text-to-speech service provides many options for synthesized voices,
12+
under [text-to-speech language support](../../../../language-support.md#text-to-speech).
13+
After a one-time configuration, the SPX tool lets you synthesize speech from text using commands from the command line.

0 commit comments

Comments
 (0)