2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-04-05 17:39:39 -04:00

fix to preserve "general" speaking styles

This commit is contained in:
Xjph 2021-11-15 20:35:42 -03:30
parent cd246c76e8
commit d37b289355

View File

@ -73,19 +73,17 @@ namespace Observatory.Herald
{ {
string demonym = GetDemonymFromLocale(voice.Locale); string demonym = GetDemonymFromLocale(voice.Locale);
if (voice.StyleList.Length > 1) voiceOptions.Add(
$"{demonym} - {voice.LocalName}",
voice);
foreach (var style in voice.StyleList)
{ {
foreach (var style in voice.StyleList) if (!string.IsNullOrWhiteSpace(style))
{
voiceOptions.Add( voiceOptions.Add(
$"{demonym} - {voice.LocalName} - {style}", $"{demonym} - {voice.LocalName} - {style}",
voice); voice);
}
} }
else
voiceOptions.Add(
$"{demonym} - {voice.LocalName}",
voice);
} }
return voiceOptions; return voiceOptions;