From 20b34998d52bc691c93ccbc4aace2d68385ca7a3 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 18:38:10 -0700 Subject: [PATCH 01/14] Made changes to how we refer to key and region Following Text Analytics example. Well tested. Got some customer feedback that what we had was confusing. --- .../speech-to-text-basics-go.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md index 08d3abf7a03b1..a7fc211aa3e52 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md @@ -22,7 +22,7 @@ Before you can do anything, you'll need to install the [Speech SDK for Go](../.. ## Speech-to-text from microphone -Use the following code sample to run speech recognition from your default device microphone. Replace the variables `subscription` and `region` with your subscription and region keys. Running the script will start a recognition session on your default microphone and output text. +Use the following code sample to run speech recognition from your default device microphone. Replace the variables `subscription` and `region` with your speech key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-region) page to find your key-location/region pair. Running the script will start a recognition session on your default microphone and output text. ```go package main @@ -62,8 +62,8 @@ func cancelledHandler(event speech.SpeechRecognitionCanceledEventArgs) { } func main() { - subscription := "YOUR_SUBSCRIPTION_KEY" - region := "YOUR_SUBSCRIPTIONKEY_REGION" + subscription := "" + region := "" audioConfig, err := audio.NewAudioConfigFromDefaultMicrophoneInput() if err != nil { @@ -112,7 +112,7 @@ See the reference docs for detailed information on the [`SpeechConfig`](https:// ## Speech-to-text from audio file -Use the following sample to run speech recognition from an audio file. Replace the variables `subscription` and `region` with your subscription and region keys. Additionally, replace the variable `file` with a path to a .wav file. Running the script will recognize speech from the file, and output the text result. +Use the following sample to run speech recognition from an audio file. Replace the variables `subscription` and `region` with your speech key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-region) page to find your key-location/region pair. Additionally, replace the variable `file` with a path to a .wav file. Running the script will recognize speech from the file, and output the text result. ```go package main @@ -126,8 +126,8 @@ import ( ) func main() { - subscription := "YOUR_SUBSCRIPTION_KEY" - region := "YOUR_SUBSCRIPTIONKEY_REGION" + subscription := "" + region := "" file := "path/to/file.wav" audioConfig, err := audio.NewAudioConfigFromWavFileInput(file) @@ -188,4 +188,4 @@ go build go run quickstart ``` -See the reference docs for detailed information on the [`SpeechConfig`](https://pkg.go.dev/github.com/Microsoft/cognitive-services-speech-sdk-go@v1.15.0/speech#SpeechConfig) and [`SpeechRecognizer`](https://pkg.go.dev/github.com/Microsoft/cognitive-services-speech-sdk-go@v1.15.0/speech#SpeechRecognizer) classes. \ No newline at end of file +See the reference docs for detailed information on the [`SpeechConfig`](https://pkg.go.dev/github.com/Microsoft/cognitive-services-speech-sdk-go@v1.15.0/speech#SpeechConfig) and [`SpeechRecognizer`](https://pkg.go.dev/github.com/Microsoft/cognitive-services-speech-sdk-go@v1.15.0/speech#SpeechRecognizer) classes. From e845b39927d40bf02c8b376610bc753894418ca4 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 18:47:10 -0700 Subject: [PATCH 02/14] added location to region since we use both terms, we should mention both. This is a response to some customer feedback. --- articles/cognitive-services/Speech-Service/overview.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/articles/cognitive-services/Speech-Service/overview.md b/articles/cognitive-services/Speech-Service/overview.md index afce217ea697a..b0410a734f425 100644 --- a/articles/cognitive-services/Speech-Service/overview.md +++ b/articles/cognitive-services/Speech-Service/overview.md @@ -76,9 +76,9 @@ To add a Speech service resource (free or paid tier) to your Azure account: --> It takes a few moments to deploy your new Speech resource. -### Find keys and region +### Find keys and location/region -To find the keys and region of a completed deployment, follow these steps: +To find the keys and location/region of a completed deployment, follow these steps: 1. Sign in to the [Azure portal](https://portal.azure.com/) using your Microsoft account. @@ -153,4 +153,4 @@ Other products offer speech models tuned for specific purposes like healthcare o > [!div class="nextstepaction"] > [Get started with speech-to-text](./get-started-speech-to-text.md) -> [Get started with text-to-speech](get-started-text-to-speech.md) \ No newline at end of file +> [Get started with text-to-speech](get-started-text-to-speech.md) From fef81f940087035f0f0a8a7467f0623b3423dd5b Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:04:21 -0700 Subject: [PATCH 03/14] fixed an error in link to Find key and location/region --- .../how-to/speech-to-text-basics/speech-to-text-basics-go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md index a7fc211aa3e52..fa13bcf65ffbf 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md @@ -22,7 +22,7 @@ Before you can do anything, you'll need to install the [Speech SDK for Go](../.. ## Speech-to-text from microphone -Use the following code sample to run speech recognition from your default device microphone. Replace the variables `subscription` and `region` with your speech key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-region) page to find your key-location/region pair. Running the script will start a recognition session on your default microphone and output text. +Use the following code sample to run speech recognition from your default device microphone. Replace the variables `subscription` and `region` with your speech key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-location/region pair. Running the script will start a recognition session on your default microphone and output text. ```go package main From 7ad9bf32338662d721491a206f66e97639083fa0 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:05:12 -0700 Subject: [PATCH 04/14] fixed error in link to find key and location/region --- .../speech-to-text-basics/speech-to-text-basics-csharp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-csharp.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-csharp.md index c6cf1262a096f..ed95fb304630d 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-csharp.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-csharp.md @@ -31,7 +31,7 @@ For platform-specific installation instructions, see the following links: ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/dotnet/api/microsoft.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/dotnet/api/microsoft.cognitiveservices.speech.speechconfig) by using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-region) page to find your key-location/region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/dotnet/api/microsoft.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/dotnet/api/microsoft.cognitiveservices.speech.speechconfig) by using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-location/region pair. ```csharp using System; From 521ad9d058969feec45c3e5595912888f9f069e9 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:06:04 -0700 Subject: [PATCH 05/14] fixed error in link to find key and location/region --- .../how-to/speech-to-text-basics/speech-to-text-basics-cpp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-cpp.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-cpp.md index a9838a564d548..2123ae0930fb1 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-cpp.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-cpp.md @@ -25,7 +25,7 @@ Before you can do anything, you'll need to install the Speech SDK. Depending on ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/cpp/cognitive-services/speech/speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/cpp/cognitive-services/speech/speechconfig) by using your key and region. See the [Find keys and location/region](../../../overview.md#find-keys-and-region) page to find your key-location/region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/cpp/cognitive-services/speech/speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/cpp/cognitive-services/speech/speechconfig) by using your key and region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-location/region pair. ```cpp using namespace std; From db79cc8521f5b7a6b96886678ec4aa985420c392 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:06:55 -0700 Subject: [PATCH 06/14] fixed error in link to find key and location/region --- .../speech-to-text-basics/speech-to-text-basics-java.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-java.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-java.md index 28e2ab21f0a01..d842b8688eed1 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-java.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-java.md @@ -26,7 +26,7 @@ Before you can do anything, you'll need to install the Speech SDK. Depending on ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig) by using your key and region. See the [Find keys and region](../../../overview.md#find-keys-and-region) page to find your key-region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig) by using your key and region. See the [Find keys and region](../../../overview.md#find-keys-and-locationregion) page to find your key-region pair. ```java import com.microsoft.cognitiveservices.speech.*; @@ -267,4 +267,4 @@ phraseList.clear(); Phrase lists are only one option to improve recognition accuracy. You can also: * [Improve accuracy with Custom Speech](../../../custom-speech-overview.md) -* [Improve accuracy with tenant models](../../../tutorial-tenant-model.md) \ No newline at end of file +* [Improve accuracy with tenant models](../../../tutorial-tenant-model.md) From ee55de7cf55d09c37b9487d783a45f0aac6d1376 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:11:57 -0700 Subject: [PATCH 07/14] fixed issues with a link to the key and location/region info --- .../speech-to-text-basics-javascript.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md index d5247cb81fc2c..94f72ce4488c3 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md @@ -33,17 +33,17 @@ For more information on `require`, see the [require documentation](https://nodej ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig). This class includes information about your subscription, like your key and associated region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig) using your key and region. See the [Find keys and region](../../../overview.md#find-keys-and-region) page to find your key-region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig) using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-location/region) page to find your key-region pair. ```javascript -const speechConfig = sdk.SpeechConfig.fromSubscription("", ""); +const speechConfig = sdk.SpeechConfig.fromSubscription("", ""); ``` There are a few other ways that you can initialize a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig): * With an endpoint: pass in a Speech service endpoint. A key or authorization token is optional. * With a host: pass in a host address. A key or authorization token is optional. -* With an authorization token: pass in an authorization token and the associated region. +* With an authorization token: pass in an authorization token and the associated location/region. > [!NOTE] > Regardless of whether you're performing speech recognition, speech synthesis, translation, or intent recognition, you'll always create a configuration. @@ -62,7 +62,7 @@ To recognize speech from an audio file, create an `AudioConfig` using `fromWavFi ```javascript const fs = require('fs'); const sdk = require("microsoft-cognitiveservices-speech-sdk"); -const speechConfig = sdk.SpeechConfig.fromSubscription("", ""); +const speechConfig = sdk.SpeechConfig.fromSubscription("", ""); function fromFile() { let audioConfig = sdk.AudioConfig.fromWavFileInput(fs.readFileSync("YourAudioFile.wav")); @@ -87,7 +87,7 @@ For many use-cases, it is likely your audio data will be coming from blob storag ```javascript const fs = require('fs'); const sdk = require("microsoft-cognitiveservices-speech-sdk"); -const speechConfig = sdk.SpeechConfig.fromSubscription("", ""); +const speechConfig = sdk.SpeechConfig.fromSubscription("", ""); function fromStream() { let pushStream = sdk.AudioInputStream.createPushStream(); @@ -134,7 +134,7 @@ switch (result.reason) { if (cancellation.reason == CancellationReason.Error) { console.log(`CANCELED: ErrorCode=${cancellation.ErrorCode}`); console.log(`CANCELED: ErrorDetails=${cancellation.errorDetails}`); - console.log("CANCELED: Did you update the subscription info?"); + console.log("CANCELED: Did you update the key and location/region info?"); } break; } @@ -179,7 +179,7 @@ recognizer.canceled = (s, e) => { if (e.reason == CancellationReason.Error) { console.log(`"CANCELED: ErrorCode=${e.errorCode}`); console.log(`"CANCELED: ErrorDetails=${e.errorDetails}`); - console.log("CANCELED: Did you update the subscription info?"); + console.log("CANCELED: Did you update the key and location/region info?"); } recognizer.stopContinuousRecognitionAsync(); @@ -255,4 +255,4 @@ phraseList.clear(); Phrase lists are only one option to improve recognition accuracy. You can also: * [Improve accuracy with Custom Speech](../../../custom-speech-overview.md) -* [Improve accuracy with tenant models](../../../tutorial-tenant-model.md) \ No newline at end of file +* [Improve accuracy with tenant models](../../../tutorial-tenant-model.md) From e19e5b5c46d8a97195380b6532c6fcb57efa68d5 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:16:17 -0700 Subject: [PATCH 08/14] Bug fix --- .../speech-to-text-basics/speech-to-text-basics-javascript.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md index 94f72ce4488c3..2b040586ae49d 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md @@ -33,7 +33,7 @@ For more information on `require`, see the [require documentation](https://nodej ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig) using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-location/region) page to find your key-region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig) using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-region pair. ```javascript const speechConfig = sdk.SpeechConfig.fromSubscription("", ""); From 6dc0e8c6929368e1a605b4919a67236010232d38 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:17:18 -0700 Subject: [PATCH 09/14] fixed bug --- .../speech-to-text-basics/speech-to-text-basics-python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md index 7cd2f7e667600..9914c1bdbee55 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md @@ -40,7 +40,7 @@ import azure.cognitiveservices.speech as speechsdk ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig) using your key and region. See the [Find keys and region](../../../overview.md#find-keys-and-region) page to find your key-region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig) using your key and region. See the [Find keys and region](../../../overview.md#find-keys-and-locationregion) page to find your key-region pair. ```Python speech_config = speechsdk.SpeechConfig(subscription="", region="") From ef49e614226760b7e38bbfadf59fdb8c9bc0e7f0 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:29:14 -0700 Subject: [PATCH 10/14] fixed a bug --- .../speech-to-text-basics/speech-to-text-basics-python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md index 9914c1bdbee55..989150fdcd043 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md @@ -40,7 +40,7 @@ import azure.cognitiveservices.speech as speechsdk ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig) using your key and region. See the [Find keys and region](../../../overview.md#find-keys-and-locationregion) page to find your key-region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig) using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-region pair. ```Python speech_config = speechsdk.SpeechConfig(subscription="", region="") @@ -83,7 +83,7 @@ If you want to recognize speech from an audio file instead of using a microphone import azure.cognitiveservices.speech as speechsdk def from_file(): - speech_config = speechsdk.SpeechConfig(subscription="", region="") + speech_config = speechsdk.SpeechConfig(subscription="", region="") audio_input = speechsdk.AudioConfig(filename="your_file_name.wav") speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config, audio_config=audio_input) From f8a85756e92f3818f8b6aea8a42c8c81580a1085 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:30:51 -0700 Subject: [PATCH 11/14] Fixed bug --- .../how-to/speech-to-text-basics/speech-to-text-basics-java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-java.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-java.md index d842b8688eed1..50ecb6ab4c7fb 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-java.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-java.md @@ -26,7 +26,7 @@ Before you can do anything, you'll need to install the Speech SDK. Depending on ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig) by using your key and region. See the [Find keys and region](../../../overview.md#find-keys-and-locationregion) page to find your key-region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig) by using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-location/region pair. ```java import com.microsoft.cognitiveservices.speech.*; From d243566618d6f71cad00bc26d613d329446ec89b Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:33:26 -0700 Subject: [PATCH 12/14] fixed bug --- .../speech-to-text-basics/speech-to-text-basics-javascript.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md index 2b040586ae49d..a2403e5ae9c4a 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md @@ -33,7 +33,7 @@ For more information on `require`, see the [require documentation](https://nodej ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig) using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig) using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-location/region pair. ```javascript const speechConfig = sdk.SpeechConfig.fromSubscription("", ""); From 7f985d61242c854cd027dc0bcc04dd0381607536 Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 21:36:07 -0700 Subject: [PATCH 13/14] fixed bug --- .../speech-to-text-basics/speech-to-text-basics-python.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md index 989150fdcd043..e21f6b9e88ebc 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-python.md @@ -40,10 +40,10 @@ import azure.cognitiveservices.speech as speechsdk ## Create a speech configuration -To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig) using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-region pair. +To call the Speech service using the Speech SDK, you need to create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig). This class includes information about your subscription, like your key and associated location/region, endpoint, host, or authorization token. Create a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig) using your key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-location/region pair. ```Python -speech_config = speechsdk.SpeechConfig(subscription="", region="") +speech_config = speechsdk.SpeechConfig(subscription="", region="") ``` There are a few other ways that you can initialize a [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig): @@ -63,7 +63,7 @@ To recognize speech using your device microphone, simply create a `SpeechRecogni import azure.cognitiveservices.speech as speechsdk def from_mic(): - speech_config = speechsdk.SpeechConfig(subscription="", region="") + speech_config = speechsdk.SpeechConfig(subscription="", region="") speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config) print("Speak into your microphone.") From 34908e35c4d9251b507d9fa29303fc1c6523c41a Mon Sep 17 00:00:00 2001 From: oliver scholz Date: Thu, 1 Jul 2021 22:39:42 -0700 Subject: [PATCH 14/14] fixed bug --- .../how-to/speech-to-text-basics/speech-to-text-basics-go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md index fa13bcf65ffbf..51e391dffd75a 100644 --- a/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md +++ b/articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-go.md @@ -112,7 +112,7 @@ See the reference docs for detailed information on the [`SpeechConfig`](https:// ## Speech-to-text from audio file -Use the following sample to run speech recognition from an audio file. Replace the variables `subscription` and `region` with your speech key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-region) page to find your key-location/region pair. Additionally, replace the variable `file` with a path to a .wav file. Running the script will recognize speech from the file, and output the text result. +Use the following sample to run speech recognition from an audio file. Replace the variables `subscription` and `region` with your speech key and location/region. See the [Find keys and location/region](../../../overview.md#find-keys-and-locationregion) page to find your key-location/region pair. Additionally, replace the variable `file` with a path to a .wav file. Running the script will recognize speech from the file, and output the text result. ```go package main