|
-
Sep 28th, 2005, 09:43 AM
#1
Thread Starter
Fanatic Member
TTS Help
I need help with the following code:
VB Code:
'Needs reference to Microsoft Speech Object Library
Dim Speaker As New SpeechLib.SpVoice
Private Sub Command1_Click()
Speaker.Speak "Hello there, how are you feeling? I am feeling very good right now, my processor is really running at top speeds!"
End Sub
With the above code, if you have a button called 'Command1' and you click it you will see that the form freezes as it speaks the text. My question is whether it is possible to use text-to-speech without freezing the form when reading the text, because I want to make it read entire documents.
Thanx 4 ne help,
-
Sep 28th, 2005, 12:25 PM
#2
Thread Starter
Fanatic Member
-
Sep 28th, 2005, 01:44 PM
#3
Frenzied Member
Re: TTS Help
you can make it read all the text you want at once.
you can also make another form with the options to stop it pase it and so one.
if you don't want your form to freez you might wona put the control in another form and that will not freez your original form
-
Sep 28th, 2005, 01:59 PM
#4
Hyperactive Member
Re: TTS Help
That's really cool. I didn't know about the speech processor.
There is a flag in the speak call that allows it to execute asynchronously.
Try this.
VB Code:
Public Speaker As New SpeechLib.SpVoice
Speaker.Speak "Put some string", SVSFlagsAsync
You can use Speaker object to pause it and do other things. Be sure to make speaker a public global object otherwise the speech stops as soon as the object goes out of scope.
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
|