Results 1 to 3 of 3

Thread: [RESOLVED] [2008] Get all installed speech synthesis voices

  1. #1

    Thread Starter
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Resolved [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.
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  2. #2

    Thread Starter
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    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.
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  3. #3

    Thread Starter
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    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
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width