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.
- A subscription key for the Speech service. See Try the speech service for free.
- For intent recognition: an endpoint subscription key for the Language Understanding Intelligent Service (LUIS), and an application ID.
- A Node.js compatible device.
-
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
ornortheurope
.- 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.
The sample demonstrates the speech, intent, and translation recognizers. You can start them individually by calling:
node index.js [speech|intent|translate] {filename}