Skip to content

Commit 3657bab

Browse files
author
David
authored
remove sdk.
1 parent 44fe933 commit 3657bab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/cognitive-services/Speech-Service/includes/how-to/speech-to-text-basics/speech-to-text-basics-javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ Reference the `AudioConfig` object as follows:
9797

9898
```javascript
9999
const audioConfig = AudioConfig.fromDefaultMicrophoneInput();
100-
const recognizer = new sdk.SpeechRecognizer(speechConfig, audioConfig);
100+
const recognizer = new SpeechRecognizer(speechConfig, audioConfig);
101101
```
102102

103103
If you want to provide an audio file instead of using a microphone, you'll still need to provide an `audioConfig`. However, this can only be done when targeting **Node.js** and when you create an [`AudioConfig`](https://docs.microsoft.com/javascript/api/microsoft-cognitiveservices-speech-sdk/audioconfig?view=azure-node-latest), instead of calling `fromDefaultMicrophoneInput`, you'll call `fromWavFileOutput` and pass the `filename` parameter.
104104

105105
```javascript
106106
const audioConfig = AudioConfig.fromWavFileInput("YourAudioFile.wav");
107-
const recognizer = new sdk.SpeechRecognizer(speechConfig, audioConfig);
107+
const recognizer = new SpeechRecognizer(speechConfig, audioConfig);
108108
```
109109

110110
## Recognize speech

0 commit comments

Comments
 (0)