|
-
Sep 14th, 2005, 12:25 PM
#1
Thread Starter
Hyperactive Member
Sam Microsoft in VB?
is there a posabilaty to use the Windows XP Voice (Sam Microsoft) in My visual basic program?
506C65617365205261746520506F7374732E2E2E
-
Sep 14th, 2005, 12:46 PM
#2
Re: Sam Microsoft in VB?
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
-
Sep 14th, 2005, 01:28 PM
#3
Thread Starter
Hyperactive Member
Re: Sam Microsoft in VB?
If you have the speech sdk,
What do you meen?
506C65617365205261746520506F7374732E2E2E
-
Sep 14th, 2005, 01:33 PM
#4
Re: Sam Microsoft in VB?
I believe he is referring to this
-
Sep 14th, 2005, 01:51 PM
#5
Hyperactive Member
Re: Sam Microsoft in VB?
Reply To Iron Skull,
Take a look at this:
http://www.codeproject.com/vbscript/texttospeech.asp
Best Regards,
ERAN
Eran Fox
ASSEMBLER,C,C++,VB6,SQL...
-
Sep 18th, 2005, 11:31 AM
#6
Thread Starter
Hyperactive Member
Re: Sam Microsoft in VB?
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
506C65617365205261746520506F7374732E2E2E
-
Sep 18th, 2005, 11:39 AM
#7
Frenzied Member
Re: Sam Microsoft in VB?
- 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
-
Sep 18th, 2005, 12:06 PM
#8
Thread Starter
Hyperactive Member
Re: Sam Microsoft in VB?
- 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?
Last edited by Iron Skull; Sep 18th, 2005 at 12:10 PM.
506C65617365205261746520506F7374732E2E2E
-
Sep 18th, 2005, 12:27 PM
#9
Re: Sam Microsoft in VB?
Check out this page for AGENT downloads. The SAPI control is good.
http://www.microsoft.com/msagent/downloads/user.asp#tts
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|