-
Notifications
You must be signed in to change notification settings - Fork 2
Description
As part of our work on voice selection, one of the very first things that we need to do is to filter out very low quality and novelty voices.
Very low quality voices are broken down into two groups:
- Eloquence voices on Apple devices
- and eSpeak voices on Chrome OS
Eloquence voice suffer from the usual Apple approach which means that they can show up with two different name/voiceURI when calling getVoices():
- "Name"
- or "Name (Language (Country))" where language and country are localized based on country settings
It's also worth pointing out that for each of these Apple voice, we'll usually find 14 different match across as many different languages. These languages are all identified using language and otherLanguages in the JSON file documenting these voices.
eSpeak voices are much more straightforward and matching them based on their name is enough.
For novelty voices, the situation is a little different. They're also localized by Apple, but not in a way that can be easily predicted. For example "Bad News" gets translated into "Mauvaises nouvelles" in French and "Malas noticias" in Spanish.
In the JSON, these translations are listed under altNames while the English names are in name.
In order to filter out these very low quality voices and novelty voices, we can follow these steps:
- obtain all voices from the Web Speech API using
getVoices() - iterate through voices from these two lists
- try to find one or more match for each voice based on
nameusing a regular expression that accepts any character after the string extracted fromname, if any results are found, remove them from the list of voices and skip to the next voice in the list - try to find an exact match for each voice based on values in
altNames, if any result is found, remove it from the list of voices and skip to the next voice in the list
Metadata
Metadata
Assignees
Labels
Type
Projects
Status