[RESOLVED] [2008] Get all installed speech synthesis voices
I need to get all the installed System.Speech-compatible synthesis voices from a particular machine, so I can enable the user to choose which one they want. SelectVoiceByHints is not good, since it doesn't necessarily change the voice if the needed voice is not installed. SAPI 5.3 is preferred.
Re: [2008] Get all installed speech synthesis voices
Oh come on, someone must know something, since there is a SetVoice method which takes the voice's name as the argument.
Re: [2008] Get all installed speech synthesis voices
After extensive searching on MSDN, I actually managed to find the solution myself. Here it is:
Code:
Private WithEvents spcsynth As New Speech.Synthesis.SpeechSynthesizer
Private voices As System.Collections.ObjectModel.ReadOnlyCollection(Of System.Speech.Synthesis.InstalledVoice)
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
voices = spcsynth.GetInstalledVoices()
For Each v As System.Speech.Synthesis.InstalledVoice In voices
ListBox1.Items.Add(String.Format("Name: {0}, Gender: {1}, Age: {2}, Description: {3}", v.VoiceInfo.Name, v.VoiceInfo.Gender, v.VoiceInfo.Age, v.VoiceInfo.Description))
Next
End Sub