Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to play received audio stream? #19

Open
mitulgolakiya opened this issue Nov 13, 2017 · 2 comments
Open

How to play received audio stream? #19

mitulgolakiya opened this issue Nov 13, 2017 · 2 comments

Comments

@mitulgolakiya
Copy link

I am using following function,

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 => /* ... */);

I am receiving data on the readable event and getting buffer data. Can anyone let me know, how can I play that audio?

@dataoracle
Copy link

I'm also very interested on this. So far I was only able to play the audio on the speakers using the .synthesize method and passing the audioResponse.wave to a wav reader following the example here

While it does work, it uses the .synthesize method and not the synthesizeStream which looks it's the way to go. I use the later and try to pass the audioStream directly to the wav reader but I get white noise audio on the speaker.

@palmerabollo any idea about this? The bottom line is how to use synthesizeStream and pipe the stream audio to the speaker. Thanks!

@palmerabollo
Copy link
Owner

@dataoracle @mitulgolakiya I have no experience with that, sorry. Did you finally manage to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants