microsoft/cognitive-services-speech-sdk-js
Microsoft Azure Cognitive Services Speech SDK for JavaScript
What this project is
The Microsoft Cognitive Services Speech SDK for JavaScript is the JavaScript version of Microsoft's Speech SDK. It lets you add speech features (like recognition and synthesis) to web apps and Node.js programs. The README says it supports both browser scenarios and the Node.js environment.
How to install it
Use npm to get the latest stable version:
npm install microsoft-cognitiveservices-speech-sdk
Where to find usage examples
The README points to:
- A quick tutorial for Node.js (link in the README)
- An API reference (link in the README)
- Sample code in the Speech SDK samples repository – quick-start examples for Node.js and browser, plus more samples under
samples/js.
Building from source
You don't have to build it – prebuilt packages are provided. But if you want to build yourself:
- You need Git and Node.js (version 12.44.0+ or 14.17.0+ for Node 14).
- Clone the repo, run
npm run setup,npm install, thennpm run build.
Testing
- Running
npm run testcompiles and lints test files to catch early problems. - Full tests require several specially configured Azure subscriptions (speech key, region, etc.). You can pass them via
RunTests.cmdor a secrets file. - Some live dialog tests are disabled by default; you can enable them with an environment variable or a setting in
TestConfiguration.ts. - You can run a subset of tests by editing
jest.config.jsto target specific test files.
Data / Telemetry
The project collects data and sends it to Microsoft to help monitor and improve the service. You can disable telemetry globally with:
sdk.Recognizer.enableTelemetry(false);
The README strongly recommends keeping telemetry enabled – without it, Microsoft can't do detailed analysis if you file a support request.
Contributing
- Contributions are welcome, but you must agree to a Contributor License Agreement (CLA).
- The project follows the Microsoft Open Source Code of Conduct.
All details above come directly from the project's README.
Note: The README does not include code examples for actual speech usage – only installation, building, testing, telemetry, and contributing instructions.
Related
- Project
- Project
- Project
- Project
- Project