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

SpeechSynthesizer ctor Type should allow null for audioConfig #550

Open
Mike-Bell opened this issue Jul 7, 2022 · 3 comments
Open

SpeechSynthesizer ctor Type should allow null for audioConfig #550

Mike-Bell opened this issue Jul 7, 2022 · 3 comments
Assignees
Labels
in review Acknowledged and being looked at now

Comments

@Mike-Bell
Copy link

Mike-Bell commented Jul 7, 2022

This should not give a TS error, since this is supported according to the docs (and by testing):
image

Indeed, I can hack around it with new SpeechSynthesizer(speechConfig, null as unknown as AudioConfig);, but that's mildly annoying. Note that passing null results in a different behavior than not passing anything.

@Mike-Bell Mike-Bell changed the title SpeechSynthesizer Type should allow null for audioConfig SpeechSynthesizer ctor Type should allow null for audioConfig Jul 7, 2022
@jhakulin jhakulin added the in review Acknowledged and being looked at now label Jul 11, 2022
@jhakulin
Copy link
Member

@yulin-li Would you please take a look at this issue and let us know your comments?

@yulin-li
Copy link
Contributor

@Mike-Bell, thanks for raising this issue and you are right, the audioConfig could be null. Let me send out a PR to fix the type.

@NicolasReibnitz
Copy link

Hey all, this is still open. It should be a quick win. Could you look into it?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Acknowledged and being looked at now
Projects
None yet
Development

No branches or pull requests

4 participants