Results 1 to 9 of 9

Thread: Sam Microsoft in VB?

  1. #1

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Sam Microsoft in VB?

    is there a posabilaty to use the Windows XP Voice (Sam Microsoft) in My visual basic program?

    506C65617365205261746520506F7374732E2E2E

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Sam Microsoft in VB?

    If you have the speech sdk, this speaks what's in the textbox.
    VB Code:
    1. Option Explicit
    2.  
    3. Dim sp As New SpeechLib.SpVoice
    4.  
    5. Private Sub Command1_Click()
    6.   sp.Rate = 0 '  -10 TO +10
    7.   If Text1.Text = "" Then 'if text1 is empty do nothing
    8.   Else
    9.     sp.Speak Text1.Text 'will speak what's in text1
    10.   End If
    11. End Sub
    12.  
    13. Private Sub Form_Load()
    14.   Text1.Text = ""
    15. End Sub

  3. #3

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Sam Microsoft in VB?

    If you have the speech sdk,
    What do you meen?

    506C65617365205261746520506F7374732E2E2E

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Sam Microsoft in VB?

    I believe he is referring to this

  5. #5
    Hyperactive Member eranfox's Avatar
    Join Date
    May 2001
    Posts
    492

    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...

  6. #6

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    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:
    1. Option Explicit
    2.  
    3. Dim Speed As Integer
    4. Dim sp As New SpeechLib.SpVoice
    5.  
    6.  
    7. Private Sub Command1_Click()
    8.   sp.Rate = Speed '  -10 TO +10
    9.   If Text1.Text = "" Then 'if text1 is empty do nothing
    10.   Else
    11.     sp.Speak Text1.Text 'will speak what's in text1
    12.   End If
    13. End Sub
    14.  
    15. Private Sub Form_Load()
    16.   Text1.Text = ""
    17. End Sub
    18.  
    19. Private Sub Slider1_Change()
    20. Speed = Slider1.Value
    21. lblspeed.Caption = Slider1.Value
    22. End Sub

    506C65617365205261746520506F7374732E2E2E

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

    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:
    1. Private Sub Command1_Click()
    2. DirectSS1.Speak Text1.Text
    3. End Sub
    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

  8. #8

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    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

  9. #9
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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
  •  



Click Here to Expand Forum to Full Width