Results 1 to 4 of 4

Thread: TTS Help

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Question TTS Help

    I need help with the following code:
    VB Code:
    1. 'Needs reference to Microsoft Speech Object Library
    2. Dim Speaker As New SpeechLib.SpVoice
    3. Private Sub Command1_Click()
    4. Speaker.Speak "Hello there, how are you feeling? I am feeling very good right now, my processor is really running at top speeds!"
    5. 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,
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: TTS Help

    Doesn't anyone know??
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

  3. #3
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    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
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  4. #4
    Hyperactive Member umilmi81's Avatar
    Join Date
    Sep 2005
    Location
    Sterling Heights, Mi.
    Posts
    335

    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:
    1. Public Speaker As New SpeechLib.SpVoice
    2.  
    3. 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
  •  



Click Here to Expand Forum to Full Width