aws-samples / amazon-sumerian-hosts

Amazon Sumerian Hosts (Hosts) is an experimental open source project that aims to make it easy to create interactive animated 3D characters for Babylon.js, three.js, and other web 3D frameworks. It leverages AWS services including Amazon Polly (text-to-speech) and Amazon Lex (chatbot).
MIT No Attribution
174 stars 80 forks source link

Adding language as an optional argument to HostObject.addTextToSpeech #107

Closed JuliaABurch closed 2 years ago

JuliaABurch commented 2 years ago

Description

Adding language as a parameter to the static helper method HostObject.addTextToSpeech, with a default of en-US -- this is somewhat arbitrary, as the core library actually specifies en-GB as a default language if none is specified. It ultimately checks to make sure the language is supported by the voice, and will select the voice's default language if not.

So this is not a dangerous default to set -- in the sense that if we were to pass in Mizuki (a voice that only supports the language ja-JP) without passing in a language as an argument to override the default, the core library will do the right thing by using ja-JP instead of the en-US default..

Submission Checklist

I confirm that I have...


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

eherozhao commented 2 years ago

If I remember right, the BabylonJS Editor is only supporting English for now. Will it be a blocker of any of our language support?

JuliaABurch commented 2 years ago

Will it be a blocker of any of our language support?

This does not block any language support. This will allow customers to use this helper method with voices that support more than one language (such as Aditi, which can be used with en-IN or hi-IN.)