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 install
to install the dependencies of the quickstart. This will place the Speech SDK library in thenode_modules
directory. - Update the
index.js
file with your configuration:- Replace the string
YourSubscriptionKey
with your own subscription key. - Replace the string
YourServiceRegion
with the service region of your subscription. For example, replace withwestus
if you are using the 30-day free trial subscription. - Replace the string
YourAudioFile.wav
with a path to a.wav
file 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.