Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Quickstart: Recognize speech in JavaScript on Node.js.

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.

Prerequisites

Prepare the sample

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 the node_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 with westus 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).

Run the sample

Execute node index.js from the location where you have downloaded this quickstart.

References