Skip to content

Select voice based on gender or content of activity #2292

@compulim

Description

@compulim

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]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions