Converting Apple voices from a list of altNames
to a localized string
#38
Closed
HadrienGardeur
started this conversation in
Ideas
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm closing that discussion since this is now a work in progress: #40 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As documented in #23, Apple has an inconsistent approach for voice names, where different string patterns are used, based on:
As I continue to add more and more languages to this project, it keeps on taking longer and longer to go back to every single language that I've already documented and add localized voices in
altNames
.I'm tempted to move away from this approach and document locales instead. For example the English locale for Apple could look something like that:
For each Apple voice, I would document a new
quality
property along with a newlocalizedVoice
property. Here's an example:In contrast, here's the current approach where everything is listed in
altNames
:web-speech-recommended-voices/json/fr.json
Lines 183 to 226 in cecfa69
Overall:
altNames
would continue to provide all possible variants for that voice's language, which would be a decent fallback for those who don't want to use code to generate the full list of voice namesaltNames
localizedVoice
,language
,quality
andnavigator.language
I could easily generate additional voice namesen-us
fornavigator.language
, it would generate the following voice names using the localization file: "Audrey (Enhanced)", "Audrey (Premium)" and "Audrey (French (France))"The main downsides to this approach that I can currently identify:
The second one is fairly easy to work around (we could generate voice names for every single language supported), but less optimal than simply generating voice names for the user's locale.
Beta Was this translation helpful? Give feedback.
All reactions