Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

JavaScript Speech Recognition and Translation Sample for Node.js

This sample demonstrates how to recognize speech with the Speech SDK for JavaScript on Node.js. It is based on the Microsoft Cognitive Services Speech SDK for JavaScript. See this article for introductory information on the Speech SDK for JavaScript on Node.js.

Prerequisites

Prepare the sample

  • Update the following strings in the settings.js file with your configuration:

    • YourSubscriptionKey: replace with your subscription key.
    • YourServiceRegion: replace with the region your subscription is associated with. For example, westus or northeurope.
    • The following settings apply for intent recognition powered by the Language Understanding service (LUIS):
      • YourLanguageUnderstandingSubscriptionKey: replace with your Language Understanding service subscription key (endpoint key).
      • YourLanguageUnderstandingServiceRegion: replace with the region associated with your Language Understanding service subscription.
      • YourLanguageUnderstandingAppId: replace with the ID of a Language Understanding service application that you want to recognize intents with.
  • Run npm install to install any required dependency on your computer.

Run the sample

The sample demonstrates the speech, intent, and translation recognizers. You can start them individually by calling:

node index.js [speech|intent|translate] {filename}

References