2 instantiations of InstalledVoice
System.Speech (2)
Internal\Synthesis\VoiceSynthesis.cs (2)
69
_installedVoices.Add(new
InstalledVoice
(this, installedVoice.VoiceInfo));
1481
voices.Add(new
InstalledVoice
(voiceSynthesizer, new VoiceInfo(voiceToken)));
34 references to InstalledVoice
System.Speech (34)
Internal\Synthesis\VoiceSynthesis.cs (24)
66
_installedVoices = new List<
InstalledVoice
>(s_allVoices.Count);
67
foreach (
InstalledVoice
installedVoice in s_allVoices)
542
internal ReadOnlyCollection<
InstalledVoice
> GetInstalledVoices(CultureInfo? culture)
546
return new ReadOnlyCollection<
InstalledVoice
>(_installedVoices);
550
Collection<
InstalledVoice
> voices = new();
554
foreach (
InstalledVoice
voice in _installedVoices)
562
return new ReadOnlyCollection<
InstalledVoice
>(voices);
1108
InstalledVoice
? viDefault = null;
1114
viDefault =
InstalledVoice
.Find(_installedVoices, defaultVoice != null ? defaultVoice.VoiceInfo : defaultVoiceId!);
1129
viDefault ??=
InstalledVoice
.FirstEnabled(_installedVoices, CultureInfo.CurrentUICulture);
1158
foreach (
InstalledVoice
sysVoice in _installedVoices)
1184
private TTSVoice? MatchVoice(CultureInfo? culture, VoiceGender gender, VoiceAge age, int variant, bool switchContext, [DisallowNull] ref
InstalledVoice
? viDefault)
1189
List<
InstalledVoice
> tokens = new(_installedVoices);
1203
InstalledVoice
sysVoice = MatchVoice(viDefault, culture, gender, age, variant, tokens);
1226
private static
InstalledVoice
MatchVoice(
InstalledVoice
defaultTokenInfo, CultureInfo? culture, VoiceGender gender, VoiceAge age, int variant, List<
InstalledVoice
> tokensInfo)
1229
InstalledVoice
? sysVoice = defaultTokenInfo;
1236
InstalledVoice
ti = tokensInfo[iToken];
1270
foreach (
InstalledVoice
ti in tokensInfo)
1465
private static List<
InstalledVoice
> BuildInstalledVoices(VoiceSynthesis voiceSynthesizer)
1467
List<
InstalledVoice
> voices = new();
1773
private List<
InstalledVoice
> _installedVoices;
1774
private static List<
InstalledVoice
>? s_allVoices;
Synthesis\InstalledVoice.cs (8)
52
if (obj is not
InstalledVoice
ti2)
68
internal static
InstalledVoice
? Find(List<
InstalledVoice
> list, VoiceInfo voiceId)
70
foreach (
InstalledVoice
ti in list)
80
internal static
InstalledVoice
? FirstEnabled(List<
InstalledVoice
> list, CultureInfo culture)
82
InstalledVoice
? voiceFirst = null;
83
foreach (
InstalledVoice
ti in list)
Synthesis\SpeechSynthesizer.cs (2)
243
public ReadOnlyCollection<
InstalledVoice
> GetInstalledVoices()
247
public ReadOnlyCollection<
InstalledVoice
> GetInstalledVoices(CultureInfo culture)