when matching voices, need to check language matches too

This commit is contained in:
Damien Elmes 2020-01-21 20:35:00 +10:00
parent ccd7150136
commit b00a9010be

View file

@ -69,7 +69,7 @@ class TTSPlayer:
# any requested voices match? # any requested voices match?
for requested_voice in tag.voices: for requested_voice in tag.voices:
for avail in avail_voices: for avail in avail_voices:
if avail.name == requested_voice: if avail.name == requested_voice and avail.lang == tag.lang:
return TTSVoiceMatch(voice=avail, rank=rank) return TTSVoiceMatch(voice=avail, rank=rank)
rank -= 1 rank -= 1