Library tutorials & articles

Using Speech Recognition and Text to Speech

Introduction

This tutorial will show you how to create a program that can understand what you say and reply to what you say! You will need to download the speech recognition control from http://activex.microsoft.com/activex/controls/agent2/actcnc.exe if you have not already downloaded it.

Firstly add a new Standard EXE project. Then change the projects name to VoiceRecognition. Change the forms name to frmVoice. Add the Direct Speech Recognition and the Direct Text-To-Speech control to the form by right clicking on the toolbox and then selecting components. Click on the Microsoft Direct Speech Recognition and Microsoft Direct Text-To-Speech item and then click OK.

   Draw the Speech Recognition and Text-To-Speech control on the form and set the Speech Recognition controls name property to vcrVoice, the Text-To-Speech controls name property to spkSpeak and both their visible properties to false.

Comments

  1. 24 Apr 2009 at 07:48
    hello everyone.. is there another language for Speech Recognition for VB?? i live in Indonesia,,a have a problem for using this Speech Recognition with my language,Indonesian.. anybody can help me?? please.. thank for u'r help..
  2. 01 Dec 2008 at 15:12
    hey guys could someone please help. How would you be able to do this using vb.net as the controls are different. and also whats required on the form? thanks
  3. 14 Aug 2007 at 07:31

    hi,

            me from INDIA..... wanna know abt speech recog vb soft..... tell me how to successfully run that....... i've problem with that line ["grammar"].... error: invalid outside procedure...... thanx........

  4. 13 Dec 2006 at 07:01
    When the application is started and clicked the enable button error occurs.

    Run-time error '-2147220456 (80040418)':
    Automation error

    Please reply.
  5. 20 Nov 2006 at 19:00
    Einord wrote:
    I'm running VB 6.0 and XP... Everything is properly installed and so on, but i can't hear the computer speak... What can I do?
  6. 03 Nov 2005 at 07:47

    I read ur tutorials and used in VB. But my project is not work. my voice is not recognised  and phrase_finish event is not run.


    Please explain the following code in ur tutorial.




    SpeechGrammer = "[Grammar]" & vbCrLf & _
                                            "langid = 1033" & vbCrLf & _
                                            "type=cfg" & vbCrLf & _
                                            "[<Start>]" & vbCrLf & _
                                            "<start>=" & YOURNAME & vbCrLf & _
                                            "<start>=What year is it?"


    (i.e) I want what is the meaning & purpose of
       &vbCrLf&_
      type=cfg
     [<Start>]  and
    <start>



    Like the grammar can we change the prounciation by our own. If possible please give the code to change the prounciation dictionary.
     Thank U.
        By
          Kalaivani

  7. 23 Oct 2005 at 04:22

    i am sorry but this progy is not working for me i have all d/l and i have the mic on, the seakers on too i scaned the things i typed and stell the samething it wont work for me i also tryed some athere things but stell its like everthing i try dont work for this program

  8. 22 Oct 2005 at 20:29

    Hello Sir,
       Sincere thanks for your effort on the speech recognition project it really proved of great value to me. i am a student working on creating the same as my project. I only wish to operate different peripherals such as- printer, scanner, modems, web cameras on the voice commands along with an added feature of security. If u could only shed some light on my how to interface these in VB, i would be really be obliged.
    Looking forward to your response
    Thank you

  9. 04 Sep 2005 at 09:53
    i am doing a project on direct speech recognition . i found the code for my project on your website. in user comments i found some of them reply that this code is not working .
    i would like to give some suggestions for it.i worked this code with a little modifications in my procedure.it worked
    the code is:

    Option Explicit
    Private Declare Function ShellExecute Lib "shell32.dll" _
    Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal _
    lpOperation As String, ByVal lpFile As String, ByVal _
    lpParameters As String, ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long
    Private Sub Form_Load()
     Dim totaldata As String
     'define configuration
     '[Grammer], set language to english (1033)
     '[<Start>], define the words we are looking for
     totaldata = "[Grammar]" & vbCrLf & _
     "langid = 1033" & vbCrLf & _
     "type=cfg" & vbCrLf & _
     "[<Start>]" & vbCrLf & _
     "<start>=Notepad" & vbCrLf & _
     "<start>=Volume" & vbCrLf & _
     "<start>=porta" & vbCrLf
     Label1.Caption = totaldata
     DirectSR1.GrammarFromString (totaldata)
     ''''DirectSR1.Activate
     End Sub
    Private Sub Command1_Click()
    Dim totaldata As String
    Dim phrase As String
    Select Case Command1.Caption
       Case "disable"
           DirectSR1.Deactivate
           Command1.Caption = "enable"
           Label1 = "disabled"
       Case "enable"
           DirectSR1.Activate
           Command1.Caption = "disable"
           Label1 = "Ready"
          ''''Call DirectSR1_PhraseFinish(0, 0, 0, 0, 0, totaldata, phrase, 0)
           End Select
    End Sub
    Private Sub DirectSR1_PhraseFinish(ByVal flags As Long, _
    ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, _
    ByVal endlo As Long, ByVal phrase As String, ByVal parsed As String, ByVal results As Long)
    Dim sFile As String
    Dim noth As Long
    Select Case phrase
    Case "Notepad"
       sFile = "\system32\notepad.exe"
       noth = ShellExecute(0, "OPEN", Environ("SystemRoot") & sFile, "", "", 1)
       
    Case "Volume"
       sFile = "\system32\sndvol32.exe"
       noth = ShellExecute(0, "OPEN", Environ("SystemRoot") & sFile, "", "", 1)

    Case "Mediaplayer"
       sFile = "\system32\mediaplayer.exe"
       noth = ShellExecute(0, "OPEN", Environ("SystemRoot") & sFile, "", "", 1)
    End Select

    If phrase <> "" Then
       Label1.Caption = "Matched word is " & phrase
    Else
       Label1.Caption = "No word matched"
    End If
    End Sub

    1. add the phrase used in this code in speech recognition dictionary by
    selecting tools option  in the language bar and by choosing add/delete words option.
    2.check whether your speech recognition engine works perfectly.i used dragon natural speech recognition version 7, in addition to microsoft speech recognition engine. after installing the engine you would find dragon activex control in components property in visual basic.

    In this method it opens the windows applications on telling the phrase.
  10. 25 Aug 2005 at 05:16

    I need help how can I get my text to speech engine to read spanish

  11. 20 Jul 2005 at 22:57

    I had the problem that it wouldn't respond, however I figured out that I hadn't changed the following line to my name "BumbleBee".


    Const YOURNAME = "Alex  'You can replace this with your name"


    to


    Const YOURNAME = "BumbleBee"


    Works like a charm now


    Btw, I added another line that acknowledges that the program heard something even if it didn't understand what is being said.


    Private Sub vcrVoice_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, ByVal results As Long)
    Select Case Phrase
            Case Is = YOURNAME
                spkSpeak.Speak "Hello " & YOURNAME
            Case Is = "What year is it?"
                spkSpeak.Speak Year(Date)
            Case Else
                spkSpeak.Speak "What did you say?"
        End Select
    End Sub


    Thank you Alex for this awesome tutorial!!!

  12. 20 Jul 2005 at 14:55

    Hello,


    I have tried all the steps as mentioned in the "Speech Recognition Program" but the things are not working.


    on the form load the code is:


    Private Sub Form_Load()
       DirectSR1.GrammarFromFile App.Path & "\SpeechFile.txt"
       DirectSR1.GrammarFromString (totaldata)
       DirectSR1.Activate
    End Sub


    the file is placed in the application path & content of the file is as follows:


    [<Start>]
    <start>=Memo
    <start>=Sound
    <start>=New Media
    <start>=Music
    <start>=User Control
    <start>=Options
    <start>=Shut Down
    <start>=Disable
    <start>=View Logs
    <start>=What Time Is It
    <start>=Time
    <start>=What Is Today's Date
    <start>=Microsoft Word
    <start>=Microsoft Excel


    The code in "PhraseFinish" is as follows:


    Private Sub DirectSR1_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, ByVal results As Long)
       If Phrase <> "" Then
           Label1.Caption = "Matched word is " & Phrase
       Else
           Label1.Caption = "No word matched"
       End If
       
       Text1.Text = Phrase
    End Sub


    So, when i speak the words like Options, Sound, Disable, Time nothing is reflected in the textbox.


    I do not get the option of "Control Panel > Speech" in my Control pannel. Hope this should not be the problem.


    Hope you find something which will be a ray of hope for me. Thanks !!!!!

  13. 12 Jul 2005 at 05:38

    Hello


         Thanks alot... for your help ..sorry i was not able to reply you all for a long time as .. i was busy building my carrier.


    i sit in INDIA, bangalore .. U know what the help what i got from this group helped me to complete my robot and there by fetch a fantastic job in Software Industry .. Ans as this job is my first job .. its really amazing




    Thanks alot again


    Seshadri

  14. 11 Jul 2005 at 08:28

    to: Alexreg


    I read your tutorial in Voice Recognition. I followed it, but it doesn't work in my pc. then I also read your advise to seshutou; which was last year. below your advised.



    "seshutou, you can train it to understand your voice after a while (so you don't have to speak in an american accent).
    to train, goto:
    Control Panel > Speech, then click 'Train Profile'
    hope this helps  "




    I'm using windows 98 and I have installed Microsoft Speech Recognition 4.0. But when I open Control Panel>Speech>and click "Train Profile" there's nothing change. There's no window appear. What is your comment about it? Is my installation for Microsoft Speech Recognition is not completed? Or I must install something...?


    Thanks!


    GudTek

  15. 13 Feb 2005 at 06:52
    hi alex y is that this topic paste on the web cant be worked?
  16. 03 Feb 2005 at 01:58

    Hi,
    This tutorial is a miracle for me, but when I tried to add a String in the grammar, it don't work, it open the VB directory ?!?


    This is my code:
    [arial] 'define configuration
     '[Grammer], set language to French-1036 (1036 don't work so it's set to English-1033)
     '[<Start>], define the words we are looking for
     totaldata = "[Grammar]" & vbCrLf & _
     "langid = 1033" & vbCrLf & _
     "type=cfg" & vbCrLf & _
     "[<Start>]" & vbCrLf & _
     "<start>=Notepad" & vbCrLf & _
     "<start>=Volume" & vbCrLf & _
     "<start>=Media Player" & vbCrLf & _
     "<start>=Solitaire" & vbCrLf & _
     "<start>=" & opt1 & vbCrLf & _
     "<start>=Close" & vbCrLf [/arial]  


    The "<start>=" & opt1 & vbCrLf & _ is the only way I find to add a regulary changed String, but it don't work. Can you explain me why?

  17. 25 Jan 2005 at 06:16

    sir/madam
                    i doing my project in voice recognition in vb6,i am write the program same as the alex(guru) but it did not respond my voice,i also download the actcnc.exe from the web(when i am click it display "it's not a valid win32 application),what can i do ,please help me,then how to link the actcnc.exe with my project,kindly helpme every body,i is very helpful to my project,please send to my email_id : vtheivamani@yahoo.com
    thank u

  18. 07 Jul 2004 at 07:46

    hi again,
    you can't actually put VB code in the text file... try putting this in the textfile (remember to make sure the code in the PhraseFinish event recognises the commands too ).

    [<Start>]
    
    <start>=Memo
    <start>=Sound
    <start>=New Media
    <start>=Music
    <start>=User Control
    <start>=Options
    <start>=Shut Down
    <start>=Disable
    <start>=View Logs
    <start>=What Time Is It
    <start>=Time
    <start>=What Is Today's Date
    <start>=Microsoft Word
    <start>=Microsoft Excel


    hope this works now

  19. 07 Jul 2004 at 07:28


    Hi , how you doin?
    would have replied sooner but , got side tracked , last time we spoke you told me how to put the phrases into a file but cant get it right


    all i have on my form load is
    DirectSR1.GrammarFromFile ("c:\speech.txt")
    DirectSR1.Activate


    and in my file i have the following


    "[<Start>]" & vbCrLf & _
    "<start>=Memo" & vbCrLf & _
    "<start>=Sound" & vbCrLf & _
    "<start>=New Media" & vbCrLf & _
    "<start>=Music" & vbCrLf & _
    "<start>=User Control" & vbCrLf & _
    "<start>=Options" & vbCrLf & _
    "<start>=Shut Down" & vbCrLf & _
    "<start>=Disable" & vbCrLf & _
    "<start>=View Logs" & vbCrLf & _
    "<start>=What Time Is It" & vbCrLf & _
    "<start>=Time" & vbCrLf & _
    "<start>=What Is Today's Date" & vbCrLf & _
    "<start>=Microsoft Word" & vbCrLf & _
    "<start>=Microsoft Excel" & vbCrLf &


    but it dont except nothing


    please would you mind reading the above and see if you can find any problems within it


    Thank you

  20. 18 Jun 2004 at 08:45
    Quote:
    <start>=New Media" blah blah

    -you need that stuff.
  21. 17 Jun 2004 at 15:19
    One Last Question please, in the speech.txt file how should i list my phrases

    just the words

    eg
    Music
    New Media
    Sound

    or must i put the the shibang in
    eg

    <start>=New Media" blah blah


    thanks
  22. 15 Jun 2004 at 23:33
    make sure this is the only code you have for loading:
    Code:
    DirectSR1.GrammarFromFile ("c:\speech.txt")
    DirectSR1.Activate
  23. 15 Jun 2004 at 17:07
    i have written over 50 words into a file called speech.txt

    and i have changed the code as follows
    on form_load
    Dim totaldata as string
    totaldata = "c:\speech.txt" & vbCrLf & _
    "langid = 1033" & vbCrLf
     DirectSR1.GrammarFromFile (totaldata)
     DirectSR1.Activate

    and the phrase section has stayed the same

    but no go
  24. 14 Jun 2004 at 11:05
    i am trying and trying and no luck , i have put info into a text , database and a doc file , but when i attach it to my DirectSR1(funny ear jobby again)

    it does not except it


    DirectSR1.GrammarFromFile (c:\speech.txt))
    DirectSR1.Activate
    i know i am not doing it correcdtly to start but geez tried almost all the basic stuff and more but not getting the grammer file right

    please help
  25. 13 Jun 2004 at 05:50
    your welcome.
    if you can't find out how to do GrammarFromFile after a trying, come back and i'll try to give an example. please post your code again, as that would speed everything up.
  26. 12 Jun 2004 at 15:13
    i have tried to tell my Directsr1(the funny ear component) to acknowledge my file but it does not like my name no matter what i try

    i even tried putting code for the file name but nothing would you mind telling where to put the code for the file


    i know , i know i am asking for a shit load of help , but if you would not mind i would appreciate it

    Thanks
    Robert
  27. 12 Jun 2004 at 15:06
    I thought about that and am busy trying it out , if you dont will inform on how well it is going


    thanks for all your help

    Robert
  28. 11 Jun 2004 at 10:15
    try using GrammarFromFile instead of GrammarFromString... put the grammar in a file and use VB to load it. hope it helps
  29. 09 Jun 2004 at 15:32

    thanks for all your help as of yet


    but i seem to have found another problem, i can only add 20 phrases and now it tells me no more


    how do i get to add more phrases



    please help


    thanks
    Robert

  30. 08 Jun 2004 at 17:05

    Thank You very much for all your help and support , it really helped me alot


    thank you


    Robert

  31. 08 Jun 2004 at 10:07

    here's your problem:

      "<start>=New Media" & vbCrLf & _ 
    
     "<start>=Music" & vbCrLf


    you need the text in blue to tell VB that your continuing it on the next line.
    hope this helps.

  32. 07 Jun 2004 at 12:53



    hello again


    well under my PhraseFinish i have the following code for my winamp


    Case "Music"
       sFile = "c:\Program Files\winamp\winampa.exe"
       DirectSS1.Speak "Win Amp Is Loading"
       noth = ShellExecute(0, "OPEN", sFile, "", "", 1)


    and under my form_load i have the following


     Dim totaldata As String
     'define configuration
     '[Grammer], set language to english (1033)
     '[<Start>], define the words we are looking for
     totaldata = "[Grammar]" & vbCrLf & _
     "langid = 1033" & vbCrLf & _
     "type=cfg" & vbCrLf & _
     "[<Start>]" & vbCrLf & _
     "<start>=Memo" & vbCrLf & _
     "<start>=Sound Settings" & vbCrLf & _
     "<start>=New Media" & vbCrLf
      "<start>=Music" & vbCrLf


     DirectSR1.GrammarFromString (totaldata)
     DirectSR1.Activate


    the problem i am getting is everytime i add a new word to look for it displays red and tells me "Expected Line Number"


    it is like my programme is locked for only three phases


    please help
    thanks


    Robert

  33. 07 Jun 2004 at 08:45

    could you post your complete code here (with grammar text), so i can help more.

  34. 06 Jun 2004 at 14:43



    it wont except my <start> statements , keeps telling  "Expected Line Number, syntax error"


    Help please
    thanks

  35. 06 Jun 2004 at 10:00

    yes , it works very well thank you


    i just cant or maybe dont know how to add new commands for it
    please help




    thanks


    Robert

  36. 06 Jun 2004 at 07:27

    does the actual code from the tutorial work for you?

  37. 06 Jun 2004 at 06:44


    Hello


    first off , thank you for your fast responce, really appreciate it



    i have tried using everything from music - to amp , but i think my problem is the form_load execution for this command , because it wont except anything i put there..


    eg : <start>win


    would you mind showing me how to add winamp from scratch with the form_load section


    thanks


    Robert

  38. 06 Jun 2004 at 02:37

    here are some possible problems:
    1. "winamp" could be a hard word for the computer to understand.
    2. you are not specifying the full path to winamp.exe (maybe you could try ShellExecuteAPI)

  39. 05 Jun 2004 at 19:15

    Hello


    i have made my programme do what it is supposed to do ,


    open notepad
    open volume
    open media player


    tried to make my programme open winamp.exe but does not acknowledge it


    so i found out i had to add another line


    eg.


    "<start>=winamp" & vbcrtlf , something like that
    but it does not work


    even if i copy exactly like you did and change my name ,it does not work



    please tell me where i am going wrong


    thanks in advance


    Robert


  40. 01 May 2004 at 22:01

    respected sir / madam


    can ull help me , how to use the grammer.txt file .


    and how can i dynamically add words to grammer.


    can u help me . can u get me the code.


    email: seshutou@hotmail.com


    thanking you


  41. 20 Apr 2004 at 12:45

    please do not post what seems like a whole tutorial as a comment to my tutorial. if u would like to write a tutorial, please do not just repeat mine almost exactly.

  42. 20 Apr 2004 at 07:27

    hii
    go thru this steps , it may solve urs problem


    Writing Your First Speech Recognition Program


    Microsoft have been developing voice recognition for a few years now and they have a website specialize in that ( http://www.microsoft.com/speech ). In order to start programming voice command recognition, you must have Microsoft Speech Recognition Engine installed. To download a copy, visit this site ( http://www.microsoft.com ) to get it.





    In the components Dialog select Microsoft Direct Speech Recognition to have the component available to your project. This option is only available if you have the Microsoft Speech Engine installed.


    So let's start a project in Visual Basic. Select Standard EXE and when all the given codes and forms are loaded, go to Project \ Components. In the Components dialog, find and select the Microsoft Direct Speech Recognition Remember, this option is available only if you have the Microsoft Speech Engine installed. Now, an icon button that looks like an ear, yes an ear, should appear in the Toolbox bar (pic. 2), that is the Speech Recognition component. Click on the button and draw it out on the form. Now your form will have the DirectSR component icon and also shown in the code window DirectSR stands for "Direct Speech Recognition" and you guessed it, DirectSS stands for "Direct Speech Synthesis".



    An Ear icon will appear in the toolbar representing the DirectSR component.


    Now in the code window of the form with the DirectSR, select DirectSR on the top right pull down menu. Pull down the menu to the right of that and you can see the various methods, events and properties the DirectSR component provides. In this article the one DirectSR we will concern ourselves with is the PhraseFinish procedure. This is the procedure that will be called by DirectSR when it has finish processing a voice command.
     
    With the Code Window Select DirectSR1 in top left pull down menu and select PhraseFinish in the top right pull down menu.


    When you select PhraseFinish, the code that is put in place for you is the following:


    Private Sub DirectSR1_PhraseFinish(ByVal flags As Long, _
       ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, _
       ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, _
       ByVal results As Long)



    There's a lot of parameters you say. But don't be frightened, the one that we will need to be concern with is the Phrase parameter, this is the parameter string that will contain the recognized word that was processed by the DirectSR engine.


    Now that we got that set up, we will have to input a set of words for the Speech Engine to recognize. The job is very simple, we just feed in the set of words during the Form's Onload procedure. But how do we do that you ask? Simple, DirectSR have two ways for you to feed the words in, they are DirectSR1.GrammarFromString which takes in a String variable that contains the words and DirectSR1.GrammarFromFile which takes in a file path to a file that contains the words in a text file. Simple enough? The method we will use is DirectSR1.GrammarFromString because this provides the greatest flexibility because you can dynamically add additional words to the engine and still add words in from a file like DirectSR1.GrammarFromFile by putting the text in the file into a variable.


    In the Load function of the form input the following code:


    Dim totaldata As String


    totaldata = totaldata _
       & "<start>=Notepad" & vbCrLf _
       & "<start>=Volume" & vbCrLf _
       & "<start>=Media Player" & vbCrLf


     
       DirectSR1.GrammarFromString (totaldata)
       DirectSR1.Activate


    So this is how the string looks. For each line that contains a word, a tag "<start>=" is used to signify a word that follows for the DirectSR to recognize. In the sample code, three words are used, they are Notepad, Volume and Media Player. Guess what? Right, we will use these words for the voice command to load these programs. In addition, the DirectSR1.Activate is used to start the engine to begin recognizing voice commands. DirectSR1.Deactivate is used to stop the engine from recognizing voice commands.


    We are almost set. All we have to do is return to the PhraseFinish procedure to parse the command. From here on is pretty simple, remember that the Phrase parameter is all we need to be concern about, well here is how we do it in the following code.


    Dim sFile As String
    Dim noth As Long


    Select Case Phrase
       Case "Notepad"
           sFile = "\system32\notepad.exe"


           noth = ShellExecute(0, "OPEN", _
               Environ("SystemRoot") & sFile, "", "", 1)    
       Case "Volume"
           sFile = "\system32\sndvol32.exe"


           noth = ShellExecute(0, "OPEN", _
               Environ("SystemRoot") & sFile, "", "", 1)
       
       Case "Media Player:
           sFile = "C:\Program Files\Windows Media Player\mplayer2.exe"
     
           noth = ShellExecute(0, "OPEN", _
               sFile, "", "", 1)


    End Select


    Here is the low down or lodown . When the DirectSR recognizes a sound, it will process the sound into a word that may closely match the one you provided. If it matches, the Phrase variable will contain the matched word. And lo and behold, the code we use is a Select Case just for the Phrase variable for the words we fed in the engine in the load function. When a match occurs we will use an API function ShellExecute() to load the program.


    To declare the API put the following code on top of the form module.


    Declare Function ShellExecute Lib "shell32.dll" _
       Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal _
       lpOperation As String, ByVal lpFile As String, ByVal _
       lpParameters As String, ByVal lpDirectory As String, _
       ByVal nShowCmd As Long) As Long




    The core of the sample is basically done, however, as you know, nothing is really done without some style with the GUI. Here is the plan, lets put a button on the form to stop the recognition engine and also to start the engine when its stopped. Also, lets put a label to show the status of the engine and the recognized word.


    Place a label on the form. Next place a bottom on the form and double click on the button to open the code. Place the following code inside:


    Private Sub Command1_Click()
       Select Case Command3.Caption
       Case Is = "Disable"
           DirectSR1.Deactivate
           Command3.Caption = "Enable"
           Labe11 = "Disabled"
       Case Is = "Enable"
           DirectSR1.Activate
           Command3.Caption = "Disable"
           Labe11 = "Ready"
       End Select
    End Sub


    The code is straight forward. A select case to test the caption of the button. If Disable, Deactivate engine, set button caption to "Enable" and set the label caption to "Disabled". If Enable, Activate engine, set button caption to "Disable" and set the label capti

  43. 18 Apr 2004 at 02:43
    hello


        can i know how to recognise an object . wat are the requirements . if it is in vb platform its superb .


    thank u

  44. 18 Apr 2004 at 02:41
    thanx alot . i'll try it


    take care
  45. 17 Apr 2004 at 08:25
    seshutou, you can train it to understand your voice after a while (so you don't have to speak in an american accent).
    to train, goto:
    Control Panel > Speech, then click 'Train Profile'
    hope this helps
  46. 10 Apr 2004 at 05:02

    Hi,
    I am rifat from bangladesh. For speech recognition first you need a good quality microphone, then try it in a silent place. do Your desktop contain any new microphone icon? If not your installation failled.


    Send your comment?


    Rifat

  47. 10 Apr 2004 at 04:46

    hello



          i tried in my system to recognize my command but failed in this aspect . i need to know why sir. i had installed every thing and components are seen in the system. sir do i have to speek in American accent.


    plz help me


    thanking u

  48. 04 Dec 2003 at 17:08
    nevermind! i made the program at school, and tested it at home, and all works fine!.. since the components were different vb automatically deleted them, but i just replaced them with my own component i downloaded from microsoft.com and renamed them to spkspeak and so on,, and the program works!

    now all i need to figure out is how to add other words..
  49. 03 Dec 2003 at 22:20
    okay, so i got my program to talk, and after it asks what my name is, it simply wont respond with the "Hello [yourname]" part...
    my code is identical to the sites.

    although ONE thing didnt go as it should have... my spkSpeak does not have a phrasefinish event.. i had to manually type in phrasefinish.. could that be it?
    any ideas?
  50. 09 Sep 2003 at 06:51
    How do i add new words and make the computer respond to them?
  51. 09 Sep 2003 at 02:56
    Thanks
  52. 08 Sep 2003 at 07:09
    You shouldn't need to - VB will add the definition of that procedure when you select it from the combo boxes at the top of the editor. The rest of the source code is given as text in the article.
  53. 08 Sep 2003 at 06:35
    I cant see the rest of the line on this picture
    "click here to see it"

    Please help i am just a beginer at Visual Basic and i cant make out what the rest of the line says.

    More info:
    It is the line that says "Private sub vcrvoice_PhraseFinish(ByVal flags as ??????????"
  54. 01 Aug 2003 at 16:30

    Im pretty new to a lot of VB- mostly these voice settings. I was wandering if anyone has found any good settings to make the playback voice sound better (right now he talks slow and low pitched.. i'd like to tune him up a bit )

  55. 27 Jul 2003 at 10:49

    This kind of speeh recognition sounds really cool, and I want to create a program for my family to use. Basically what they should be able to do is tell the computer what they want to start and speech recognition will recognise their voice and start up the program. Hopefully if I go one step further I will be able to make the computer have a conversation with them.


    Anyway, my problem is that the computer will not say what I want it to. I've entered the code to make it say something and I've followed instructions carefully but still it won't work. Please can someone help becaues this kind of stuff is realy interesting.

  56. 05 Jun 2003 at 18:26

    Hi,


    I'm working on a VB application that already has several components.  Basically, it is an application that contains several menus and different functions within each menu.  I want to be able to speech activate each one of these menus and further, each individual function within them.  How can I integrate Microsoft's Direct Speech Recognition Tool within the rest of the application?


    Thanks

  57. 15 May 2003 at 15:09

    you can go to the www.microsoft.com to download the speech recognition.Inside go some sample code that may help you in your project!!

  58. 13 May 2003 at 06:27

    hey pals,
    we r doing a project for speech recognition..But alas our speech is not being recognisedby the system.While doing our project we found that our phrasefinish function is not been called.Can anybody help us??


    Can you help with any coding.
    Thanks a lot pals
    bhuvana

  59. 29 Apr 2003 at 05:29
    halo everybody,can anayone help me how to use speech recognition in visual basic!!!
    my problem was:
    1. In visual basic i create a "text box" that let the user type a "word" in English and create a "button" that
      let the user click to reconize user voice?
    2. After they type that word,they will click that "button" to recognize their voice though microphone.
    3. After recognize, i want to compare their voice with that "word" wheter they speak correctly or not??

    Really need all of your HELP!!Thanks to you..
  60. 04 Apr 2003 at 12:41
    Hmmm... what is all the parameters for PhraseFinish() because you has not written them?????????????? please tell me them...
  61. 10 Feb 2003 at 05:22

    Hi!
       I want to desighn a Speech engine kinda thing so I want some knowledge how does the computer detect the text and the how does it convert that text into a sound as we know that "He" will be pronounced as "hee" but how does computer detect it.
                     If any one know about it please tell me.
      THANKS.    

  62. 25 Jan 2003 at 12:53

    Please can you give me the source code of voice recognition? Please I am begging and just 13 years old and I can't get my application to work. Please help me! E-mail me at: mubassherkamal@hotmail.com

  63. 05 Dec 2002 at 02:14

    hello sir ,
    i tried that speech program in vb . but it is not working.
    now i am doing a research regarding speech recognition . so i need your help. please help me.


    thanking you,
    yours sincerely,
    J.Abdul Khaleel Qibran


    e-mail :  qibran@yahoo.com , qibran@hotmail.com

  64. 30 Aug 2002 at 01:37

    If there an easy way to add the whole dictionary in the Speech Recognition control?

  65. 25 Jul 2002 at 12:37
    you have to make the Const YOURNAME as a Global variable this way it holds its value after the function exits!!!
  66. 09 Jul 2002 at 04:36
    i would like to ask for some help regarding making such speech recognition software.

    if anyone can help...pls do email me at:

    arvin_tina@yahoo.com

    i will be making a thesis right now...and i dont know where and how to start with minimal resources!

    thanks and take care.

    arvin
  67. 30 May 2002 at 16:54

    Before the DirectSR1.SpeechFromGrammar code, put this:
    dim engine
    engine = DirectSR1.Find ("MfgName=Microsoft")
    DirectSR1.Select engine


    This assumes that you have the Microsoft speech engine installed on your system...


    Regards

  68. 27 May 2002 at 05:21

    if there are no errors from the VB end, I'm afraid it must be a problem with the Microsoft agent bit, which I have no control over..... All I can suggest is you double check everything is installed correctly, and that you check 'Speech' item in your Windows control panel

  69. 27 May 2002 at 02:52

    ): I have the same problem to that program, what can i do is I download the speech engine so my program works.

  70. 29 Apr 2002 at 15:12
    The text- speech works but the "phrase finish event "(in vcrvoice) is not able to capture my name. The string phrase(in the phrase finish event) returns a null string
  71. 27 Mar 2002 at 23:39

    I am using vb4 and win XP
    After downloading the speech engine, SAPI 4.0 runtime, Speech recognition engines, and their source code examples for vb6  I can bring up the magician and make him talk.


    I haven't installed the Speech recognition engine yet.


    I hope this helps.


    Click here if:  The speech engines don't seem to work with Microsoft Agent in Windows XP?


    Microsoft Agent Downloads


    End-user download page

  72. 26 Mar 2002 at 18:47

    I have the same setup and the same trouble.  Please help us!!!!

  73. 21 Mar 2002 at 04:02

    [3]12[/3] [century gothic]1[/century gothic]


    is it not really working or has an imcomplete command... pls try to show the working one.... please....

  74. 20 Mar 2002 at 09:22

    I'm running VB 6.0 and XP... Everything is properly installed and so on, but i can't hear the computer speak...


    What can I do?

  75. 01 Jan 1999 at 00:00

    This thread is for discussions of Using Speech Recognition and Text to Speech.

Leave a comment

Sign in or Join us (it's free).

Alex
AddThis

Related discussion

Related podcasts

  • Christian Beauclair

    14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...

Want to stay in touch with what's going on? Follow us on twitter!