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
Text to speech block in app lab and game lab #34919
Conversation
0840dfe
to
a7934f0
Compare
a7934f0
to
ed4ba6f
Compare
Sound.prototype.getPlayableBytes = function() { | ||
try { | ||
if (!window.Audio) { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why false
not undefined
or null
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the style of getPlayableFile (the function above). Should I switch to undefined?
IMO: Since we only support English, we shouldn't offer the option to change languages. That feels like a broken promise to me. We should add that option when we add more languages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved the block behind an experiment, text-to-speech-block, and removed it from the toolbox. To access it now, you need to enable the experiment and type in the block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇 really great work, jillian!!
almost forgot -- before you merge this, let's add the API keys to each environment together. we can do this after today's standup |
Added a text to speech block to app lab and game lab that takes in text, output voice gender, and language (currently only english is supported). The block is under UI in app lab and World in game lab. It defaults to female and en-us if given invalid input.
In app lab:
In game lab:
as a block:
Future work
At some point, we need to go back and add support for more languages.
Links
Testing story
There's a test for the arguments of play speech which I think should be sufficient (since we aren't pausing or stopping speech) but let me know if there's something else we need.
Reviewer Checklist: