Skip to content

Commit e2b5984

Browse files
committed
informed by survey feedback
1 parent cffe8f2 commit e2b5984

File tree

1 file changed

+6
-6
lines changed
  • articles/cognitive-services/Speech-Service/includes/quickstarts/speech-to-text-basics

1 file changed

+6
-6
lines changed

articles/cognitive-services/Speech-Service/includes/quickstarts/speech-to-text-basics/rest.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ ms.author: eur
1919
2020
## Recognize speech from a file
2121

22-
At a command prompt, run the following cURL command. Insert the following values into the command. Replace `YourSubscriptionKey` with your Speech resource key, and replace `YourServiceRegion` with your Speech resource region.
22+
At a command prompt, run the following cURL command. Insert the following values into the command. Replace `YourSubscriptionKey` with your Speech resource key, replace `YourServiceRegion` with your Speech resource region, and replace `YourAudioFile.wav` with the path and name of your audio file.
2323

2424
```console
25-
# curl
26-
speech_key="YourSubscriptionKey"
25+
key="YourSubscriptionKey"
2726
region="YourServiceRegion"
27+
audio_file=@'YourAudioFile.wav'
2828

2929
curl --location --request POST \
30-
"https://YourServiceRegion.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US" \
31-
--header "Ocp-Apim-Subscription-Key: YourSubscriptionKey" \
30+
"https://$region.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US" \
31+
--header "Ocp-Apim-Subscription-Key: $key" \
3232
--header "Content-Type: audio/wav" \
33-
--data-binary @'YourAudioFile.wav'
33+
--data-binary $audio_file
3434
```
3535

3636
You should receive a response similar to what is shown here. The `DisplayText` should be the text that was recognized from your audio file.

0 commit comments

Comments
 (0)