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

Select voice based on gender or content of activity #2292

Closed
compulim opened this issue Aug 9, 2019 · 2 comments · Fixed by #2338
Closed

Select voice based on gender or content of activity #2292

compulim opened this issue Aug 9, 2019 · 2 comments · Fixed by #2338

Comments

@compulim
Copy link
Contributor

compulim commented Aug 9, 2019

Feature Request

Ability select voice based on gender or content of activity, and also by providing custom voice model name.

This select voice predicate today is based on activity locale, UI language, and browser language only. It currently lives in component/src/Activity/Speak.js.

selectVoice: voices => {
  voices = [].slice.call(voices);

  return (
    voices.find(({ lang }) => lang === activity.locale) ||
    voices.find(({ lang }) => lang === language) ||
    voices.find(({ lang }) => lang === window.navigator.language) ||
    voices.find(({ lang }) => lang === 'en-US') ||
    voices[0]
  );
}

[Enhancement]

@compulim compulim self-assigned this Aug 9, 2019
@compulim compulim removed their assignment Aug 9, 2019
@iMicknl
Copy link
Member

iMicknl commented Aug 9, 2019

@compulim will this also include support for Custom Voice or is it already possible to choose a custom voice model.

@compulim
Copy link
Contributor Author

compulim commented Aug 9, 2019

Oh right, thanks for reminding me.

Custom Voice support is recently added (last week) to the adapter, but Web Chat did not provide a way to use it yet. This work should also allows developers to select voice by simply providing the model name.

BTW, you can try out our Web Speech API adapter for Custom Voice font support. You would need to specify both "Deployment ID" and "Voice URI" (a.k.a. custom voice model name). 😉

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

Successfully merging a pull request may close this issue.

3 participants