Getting L&H voices in VB.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I with the TTS Control(Direct speech control) speak a paragraph with any of this Languages using the control properties?.I am not able to do it
 
Hi,

Never uses L&H but the Microsoft speech sdk 5.1 works. Add a reference
to the Microsoft speech object lib 5.0 in the com tab. You can download
the sdk here.

http://www.microsoft.com/speech/download/sdk51/

This example assumes you have a textbox named txtspeak, and button
named btnsay

Dim tts As SpeechLib.SpVoice

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
tts = New SpeechLib.SpVoice
btnSay.PerformClick()
End Sub

Private Sub btnSay_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSay.Click
tts.Speak(txtSpeak.Text,
SpeechLib.SpeechVoiceSpeakFlags.SVSFlagsAsync)
End Sub

Ken
-----------------
 
I can get 4 voices in sapi 5.1 (mary,mike,sam and another one) what I do not know is how to get the T&H engines
for the other four the code comes in the sdk.Here it is
Dim WithEvents Voice As SpeechLib.SpVoic
' Creates the voice object firs
Voice = New SpeechLib.SpVoic
Dim Token As SpeechLib.ISpeechObjectToke

For Each Token In Voice.GetVoice
VoiceCB.Items.Add((Token.GetDescription())
Next Toke
VoiceCB.SelectedIndex =
Voice.Voice = Voice.GetVoices().Item(VoiceCB.SelectedIndex

Voice.Speak("hello I'm tired"
VoiceCB.SelectedIndex =
Voice.Voice = Voice.GetVoices().Item(VoiceCB.SelectedIndex
Voice.Speak("you have to rest")
 
Back
Top