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

JS Azure Speech SDK Text to Speech (control volume for AudioConfig) #463

Closed
vinothkumar1097 opened this issue Jan 6, 2022 · 3 comments
Closed
Assignees

Comments

@vinothkumar1097
Copy link

Hi Team,

I'm working with azure text to speech service for enabling voice based outputs. Using Speech SDK Javascript.

For outputing the sound, im creating fromSpeakerOutput instance with custom iPlayer (as in docs).

const browserSound = new speechsdk.SpeakerAudioDestination();
const audioConfig = speechsdk.AudioConfig.fromSpeakerOutput(browserSound);
var synthesizer = new speechsdk.SpeechSynthesizer(speechConfig, audioConfig);

Issue is, i need some iPlayer customizations like volume control, stop current sound. I could see only pause and resume. Is there any way I could achieve this ?

Thanks.

@glharper
Copy link
Member

glharper commented Jan 6, 2022

@vinothkumar1097 Thanks for using Speech SDK, and writing this issue up. Currently, the SpeakerAudioDestination does not expose the volume setting for the underlying HTMLAudioElement, but that can be added in the next version relatively easily.

What exactly do you mean by "stop current sound"? Can you pause() and just not resume?

@glharper
Copy link
Member

glharper commented Jan 7, 2022

@vinothkumar1097 I've checked in code that allows volume control and mute/unmute for SpeakerAudioDestination. These new APIs will be in the next release, due at the end of the month. Thanks again for using Speech SDK. :-)

@glharper glharper closed this as completed Jan 7, 2022
@dargilco
Copy link
Member

dargilco commented Feb 2, 2022

From the 1.20 release notes:
JavaScript: Added volume getter/setter and mute()/unmute() APIs to SpeakerAudioDestination (GitHub issue 463)

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