
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
bingspeech-api-client-saudi
Advanced tools
Microsoft Bing Speech API client. Adapted from Guido Garcías node module, and adds support for the Saudi dialaect.
A Microsoft Bing Speech API client written in node.js.
Official documentation for Bing Speech API service.
To work with Bing Speech API, you must have a subscription key. If you don't have a subscription key already, get one here: Subscriptions.
Install bingspeech-api-client in your node project with npm.
npm install -save bingspeech-api-client
See example below on how to require and use for Speech to text (STT) and text to speech (TTS).
Following example code is assuming you are using typescript. If you are, skip this section and go straight to the examples. But if you are using node ES6 and want to use the example code read on.
At present node does not support import. As mentioned on MDN
Note: This feature[
import] is only beginning to be implemented in browsers natively at this time. It is implemented in many transpilers, such as the Traceur Compiler, Babel, Rollup or Webpack.
To get the example code working change the first line to:
const { BingSpeechClient, VoiceRecognitionResponse } = require('bingspeech-api-client');
import { BingSpeechClient, VoiceRecognitionResponse } from 'bingspeech-api-client';
let audioStream = fs.createReadStream(myFileName); // create audio stream from any source
// Bing Speech Key (https://www.microsoft.com/cognitive-services/en-us/subscriptions)
let subscriptionKey = 'your_private_subscription_key';
let client = new BingSpeechClient(subscriptionKey);
client.recognizeStream(audioStream).then(response => console.log(response.results[0].name));
import { BingSpeechClient, VoiceVoiceSynthesisResponse } from 'bingspeech-api-client';
// Bing Speech Key (https://www.microsoft.com/cognitive-services/en-us/subscriptions)
let subscriptionKey = 'your_private_subscription_key';
let client = new BingSpeechClient(subscriptionKey);
client.synthesizeStream('I have a dream').then(audioStream => /* ... */);
import { BingSpeechClient, VoiceRecognitionResponse } from 'bingspeech-api-client';
// audio input in a Buffer
let wav = fs.readFileSync('myaudiofile.wav');
// Bing Speech Key (https://www.microsoft.com/cognitive-services/en-us/subscriptions)
let subscriptionKey = 'your_private_subscription_key';
let client = new BingSpeechClient(subscriptionKey);
client.recognize(wav).then(response => console.log(response.results[0].name));
import { BingSpeechClient, VoiceVoiceSynthesisResponse } from 'bingspeech-api-client';
// Bing Speech Key (https://www.microsoft.com/cognitive-services/en-us/subscriptions)
let subscriptionKey = 'your_private_subscription_key';
let client = new BingSpeechClient(subscriptionKey);
client.synthesize('I have a dream').then(response => { /* audio is a Buffer in response.wave */ });
FAQs
Microsoft Bing Speech API client. Adapted from Guido Garcías node module, and adds support for the Saudi dialaect.
We found that bingspeech-api-client-saudi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.