private void FormMain_Load(object sender, EventArgs e) { SpObjectTokenCategory otc = new SpObjectTokenCategory(); otc.SetId("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech_OneCore\\Voices"); ISpeechObjectTokens tokenEnum = otc.EnumerateTokens(); foreach (SpeechLib.ISpeechObjectToken v in tokenEnum) { string s = v.GetDescription(49); //comboBoxVoice.Items.Add(v.GetDescription(49)); lstOneVoice.Add(new oneVoice(s, v)); } SpObjectTokenCategory otc2 = new SpObjectTokenCategory(); otc2.SetId("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices"); ISpeechObjectTokens tokenEnum2 = otc2.EnumerateTokens(); foreach (SpeechLib.ISpeechObjectToken v in tokenEnum2) { string s = v.GetDescription(49); foreach (string s2 in comboBoxVoice.Items) { if (s == s2) goto nextVoice; } //comboBoxVoice.Items.Add(s); //globalVoicesObjectsList.Add(v); lstOneVoice.Add(new oneVoice(s, v)); nextVoice:; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)