mirror of
https://github.com/ankitects/anki.git
synced 2026-01-09 03:53:55 -05:00
Use prefix match for Apple Samantha voice fallback
This commit is contained in:
parent
db95bb7c05
commit
90308dd880
1 changed files with 1 additions and 4 deletions
|
|
@ -98,10 +98,7 @@ class TTSPlayer:
|
||||||
# (for example, Apple Samantha) with rank of -50
|
# (for example, Apple Samantha) with rank of -50
|
||||||
for avail in avail_voices:
|
for avail in avail_voices:
|
||||||
if avail.lang == tag.lang:
|
if avail.lang == tag.lang:
|
||||||
if (
|
if avail.lang == "en_US" and avail.name.startswith("Apple_Samantha"):
|
||||||
avail.lang == "en_US"
|
|
||||||
and avail.name == "Apple_Samantha_(English_(US))"
|
|
||||||
):
|
|
||||||
return TTSVoiceMatch(voice=avail, rank=-50)
|
return TTSVoiceMatch(voice=avail, rank=-50)
|
||||||
|
|
||||||
# if no requested or preferred voices match, we fall back on
|
# if no requested or preferred voices match, we fall back on
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue