is there a posabilaty to use the Windows XP Voice (Sam Microsoft) in My visual basic program?
Printable View
is there a posabilaty to use the Windows XP Voice (Sam Microsoft) in My visual basic program?
If you have the speech sdk, this speaks what's in the textbox.
VB Code:
Option Explicit Dim sp As New SpeechLib.SpVoice Private Sub Command1_Click() sp.Rate = 0 ' -10 TO +10 If Text1.Text = "" Then 'if text1 is empty do nothing Else sp.Speak Text1.Text 'will speak what's in text1 End If End Sub Private Sub Form_Load() Text1.Text = "" End Sub
What do you meen?Quote:
If you have the speech sdk,
I believe he is referring to this
Reply To Iron Skull,
Take a look at this:
http://www.codeproject.com/vbscript/texttospeech.asp
Best Regards,
ERAN
Ive this now but ill get an error on line 3 :S
Im thinking that i did refence i use C:\windows\speech\Vtext.oca
VB Code:
Option Explicit Dim Speed As Integer Dim sp As New SpeechLib.SpVoice Private Sub Command1_Click() sp.Rate = Speed ' -10 TO +10 If Text1.Text = "" Then 'if text1 is empty do nothing Else sp.Speak Text1.Text 'will speak what's in text1 End If End Sub Private Sub Form_Load() Text1.Text = "" End Sub Private Sub Slider1_Change() Speed = Slider1.Value lblspeed.Caption = Slider1.Value End Sub
- make a textbox "text1"
- make command button "Command1"
- press ctrl +t
- scroll down till you find direction text to speech "DirectSS1"
- add this code:
VB Code:
Private Sub Command1_Click() DirectSS1.Speak Text1.Text End Sub
- make a textbox "text1" Done
- make command button "Command1" Done
- press ctrl +t Done
- scroll down till you find direction text to speech "DirectSS1" Not There?
Check out this page for AGENT downloads. The SAPI control is good.
http://www.microsoft.com/msagent/downloads/user.asp#tts