Tts list merging

Android:{{tts zh voices=org.nobody.multitts-bdetts_xiaoxiao:Question}}
windows:{{tts zh_CN voices=Microsoft_Yaoyao:Question}}

How to merge into a single, zh and zh_CN prefixes are not the same, but they are both Chinese

anki doesn’t seem to be able to get the platform from the code, so how to deal with the inconsistency of multi-language code

As you’ve discovered, the easiest thing would be to stack these into one TTS command – Field Replacements - Anki Manual .

Have you checked with multitts (is that the name of the service?) to find out if they accept locale designations for languages? Some services are able to disregard the locale if they consider it too much information. Or will Microsoft Azure still look for and find the correct voice without the locale, because it’s specifically named?

@David I seem to recall we’ve discussed this inconsistency before, but I don’t remember what the outcome of the discussion was. How would you like to proceed?

1 Like

@dae we have three pending issues:

  1. One client’s TTS provider uses an unqualified language code, the other uses a qualified code: zh vs zh_CN
  2. Clients use different qualified codes: es_CO Vs es_US
  3. The language code differs (Android uses iw_IL for Hebrew, other platforms use he_IL)

For 1 and 2: allow a user to provide an unqualified language code: zh, and have this match all voices which have the provided language code as a prefix. A user can then define a preferred voice for each platform

Pending discussion on exact implementation and ranking of voices matched by prefix

3 is unsolved. If you feel this is Android-only (not going to come up with AwesomeTTS/Linux voices), then I’m fine to add an Android only override for the language code