This sample demonstrates how to recognize speech with the Speech SDK for JavaScript on Node.js. See the accompanying article on the SDK documentation page which describes how to build this sample from scratch in your favourite editor.
- A subscription key for the Speech service. See Try the speech service for free.
- A Node.js compatible device.
Note: more detailed step-by-step instructions are available here.
- Download the sample code to your development PC.
- Open a command prompt at the quickstart directory, and run
npm installto install the dependencies of the quickstart. This will place the Speech SDK library in thenode_modulesdirectory. - Update the
index.jsfile with your configuration:- Replace the string
YourSubscriptionKeywith your own subscription key. - Replace the string
YourServiceRegionwith the service region of your subscription. For example, replace withwestusif you are using the 30-day free trial subscription. - Replace the string
YourAudioFile.wavwith a path to a.wavfile on your disk (required format: 16 kHz sample rate, 16 bit samples, mono / single-channel).
- Replace the string
Execute node index.js from the location where you have downloaded this quickstart.