Japanese voice uses invalid locale code ja_JA (should be ja_JP)
The voice ja_JA-hi_fi_captain-medium is tagged with language code ja_JA, but JA is not a registered region subtag (checked against the IANA language subtag registry). Japan is JP, so the valid BCP 47 tag is ja_JP.
This breaks locale-aware consumers: e.g. on iOS, Locale.localizedString(forIdentifier: "ja_JA") returns nil, so apps fall back to showing the raw code.
Suggested fix: rename the key, language.code, and the ja/ja_JA/ file paths to ja_JP. Happy to provide more detail if needed.
Confirmed, thanks for the careful report β and for pinning it to the registry rather than just the symptom.
JA is not an assigned ISO 3166-1 alpha-2 / IANA region subtag, so ja_JA is not a well-formed BCP 47 tag and the nil you get back from Locale.localizedString(forIdentifier:) is the correct behavior on iOS's side. I checked the other 57 locales in voices.json as well: this is the only invalid one.
Two PRs:
- https://huggingface.co/rhasspy/piper-voices/discussions/107 β moves
ja/ja_JA/toja/ja_JP/, correctslanguage.codeandlanguage.regionin the voice config and the MODEL_CARD, fixes the key in_script/voicefest.py, and regeneratesvoices.json. The model file is byte-identical, so only the paths and the two small files' digests change. - https://github.com/OHF-Voice/piper1-gpl/pull/308 β teaches
piper.download_voicesto resolve renamed voices.
On the second one: a renamed voice records its old name in an ALIASES file, which voices.json surfaces as the entry's aliases list, but nothing actually honored that list β the downloader builds its URL from the voice name alone and never reads voices.json. So every pre-1.0 name has been broken since the rename that introduced them. With #308, ja_JA-hi_fi_captain-medium keeps working after the move and downloads under the new name, with a warning saying what it was renamed to.
One thing to plan for: once #107 merges, ja/ja_JA/... URLs will 404. That follows the precedent set by the v0 to v1 rename, which moved files rather than leaving copies behind, but it does mean anything with a hardcoded ja_JA path needs updating to ja_JP β a client-side alias can't help there.