Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Voice recognition using SAPI

  1. #1
    Low Bitrate
    Join Date
    Aug 2004
    Posts
    76

    Voice recognition using SAPI

    I'm creating a new thread so I won't clutter 0l33l's "Voice activated navigation for routis!" thread.

    I wrote my own voice recognition app using SAPI. It's generic and can be used in any application that accepts keyboard input. Features and the grammar XML can be found on my website: http://galant.circledplus.com/carpc/carpc_apps_vr.html I'll create a download link later tonight in case somebody's interested to try it out.

    I have a few questions for NTurkey...

    Is it possible to create adhoc attributes? Like <P myAttribute="fooBar" VALSTR="taskmgr.exe">task manager</P> I'm getting an error if I create an attribute it doesn't recognize. This is the reason why I just used the inner PROPNAME in the example below.
    Code:
      <RULE NAME="runApp" ID="RID_RunApp" TOPLEVEL="ACTIVE">
        <P>open</P>
        <L PROPNAME="runAppvalue">
          <P PROPNAME="task manager" VALSTR="taskmgr.exe">task manager</P>
          <P PROPNAME="i Guidance" VALSTR="iGuidance">navigation</P>
          <P PROPNAME="Media Car" VALSTR="C:\Program Files\MediaCar\MEDIACAR.exe">media car</P>
        </L>
        <O>...</O>
      </RULE>
    Also, is there a way to get the text at a particular <P> node? Like I want to get "task manager" (between the P tags, not the PROPNAME) from the above code.

    TIA

    00 Galant
    armadaE500 P3-660 320M 20G, lilliput, audigy2NX, slim/slotLoad dvd/cdrw, cardReader
    sony rm-x2s, bu303, xmDirect
    xpPro sp2, frodoPlayer 1.09, iGuidance 2.0, custom voiceRecognition
    custom shutdownController

  2. #2
    Low Bitrate BeamRider's Avatar
    Join Date
    Apr 2004
    Location
    Genova, I
    Posts
    92
    Want to try
    What language?
    :edit: What programming language?

    Installation: 90% complete - fiberglassing
    EPIA M10000 - 512Mb - 20GB
    Lilliput 7" TS - Opus 150W PCB - DLink USB Radio - slim CD-ROM - SoundBlaster MP3+ - not so crappy 40x4 Amp - BU303 GPS (waiting for) - BT support

  3. #3
    Maximum Bitrate Danceheaven's Avatar
    Join Date
    May 2002
    Location
    Essex, UK'er
    Posts
    664
    Quote Originally Posted by BeamRider
    Want to try
    What language?
    :edit: What programming language?
    VB.Net
    Co Develper of A.I.M.E.E Automotive Intelligent Multimedia Entertainment Engine
    www.aimee.cc

  4. #4
    Newbie NTurkey's Avatar
    Join Date
    Sep 2004
    Location
    Sammamish, WA
    Posts
    31
    Quote Originally Posted by djScript
    I have a few questions for NTurkey...

    Is it possible to create adhoc attributes? Like <P myAttribute="fooBar" VALSTR="taskmgr.exe">task manager</P> I'm getting an error if I create an attribute it doesn't recognize.
    As far as an arbitrary attribute for the P element in SAPI's XML, no, you can't create arbitrary XML attributes. The SAPI compiler will complain.

    In your example above, are you just trying to keep track of the application name, as well? If so, you could use something like this (you'll find two properties in the result, instead of just one ... one called AppToLaunch and one called AppName):

    Code:
       <RULE NAME="GlobalApps" TOPLEVEL="ACTIVE">
          <L>
             <P PROPNAME="AppToLaunch" VALSTR="taskmgr.exe">
                <P PROPNAME="AppName" VALSTR="Task Manager">
                   Task Manager
                </P>
             </P>
             <P PROPNAME="AppToLaunch" VALSTR="C:\Program Files\MediaCar\MEDIACAR.exe">
                <P PROPNAME="AppName" VALSTR="Media Car">
                   Media Car
                </P>
             </P>
          </L>            
       </RULE>
    Quote Originally Posted by djScript
    Also, is there a way to get the text at a particular <P> node? Like I want to get "task manager" (between the P tags, not the PROPNAME) from the above code.
    What language are you using? If you're using C++, you can get the ISpPhrase interface from the result, then you can call GetText.

    To determine what the appropriate start and count would be, once you have the SPPHRASEPROPERTY, you can look at ulFirstElement and ulCountOfElements. You might have to change your grammar around a little bit, but not much.

    Does that make any sense? I bet it doesn't if you're not using C++.
    2004 BMW 330Ci

    Audio: Alpine PXA-H701, XTANT 1.1i, PPI 4800, MB Quart QSD 216, JL W6v2
    Computer: Shuttle XPC P4 3GHz HT, 1G, 160GB HD, WinTV
    Software: StreetDeck ... soon with wicked cool speech integration ...

    Install (A/C/S): 100/100/90 %

  5. #5
    Low Bitrate
    Join Date
    Aug 2004
    Posts
    76
    Quote Originally Posted by NTurkey
    In your example above, are you just trying to keep track of the application name, as well?
    Yes, which is basically the same as the command that's why I wanted to get the text between the <P> tags. GetText(FirstElement, NumberOfElements) seems to have did the trick and I didn't have to change the grammar .

    Quote Originally Posted by NTurkey
    What language are you using?
    I'm using VB.net

    Thanks.

    00 Galant
    armadaE500 P3-660 320M 20G, lilliput, audigy2NX, slim/slotLoad dvd/cdrw, cardReader
    sony rm-x2s, bu303, xmDirect
    xpPro sp2, frodoPlayer 1.09, iGuidance 2.0, custom voiceRecognition
    custom shutdownController

  6. #6
    Low Bitrate
    Join Date
    Aug 2004
    Posts
    76
    The app can be downloaded from my website:
    http://galant.circledplus.com/carpc/carpc_apps_vr.html

    Just post here if you need help in grammar configuration.

    00 Galant
    armadaE500 P3-660 320M 20G, lilliput, audigy2NX, slim/slotLoad dvd/cdrw, cardReader
    sony rm-x2s, bu303, xmDirect
    xpPro sp2, frodoPlayer 1.09, iGuidance 2.0, custom voiceRecognition
    custom shutdownController

  7. #7
    Variable Bitrate rgardjr's Avatar
    Join Date
    Oct 2003
    Posts
    374
    Download link on website doesn't work for me.

    Also, I'm moving this reply over to here from other thread:

    Quote Originally Posted by djScript
    I wrote a voice recognition app that can be fully customized through the xml file. I'm using this app to voicecommand mediacar by enabling winamp's global hotkeys. Even if mediacar is not the active window, I could still control the audio section.

    Check it out on my website --> http://galant.circledplus.com/carpc/carpc_apps.html

    Let me know if you're interested and I'll create a new thread. I don't want to hijack 0l33l's thread.
    Looks good. I saw that you're using MediaCar and thought I'd mention an idea I had for navigating between the audio, navigation, dvd, ect... portions since it didn't appear to me that keystrokes were supported. I just wrote tiny programs that send a single mouse click to the button of the area I want to navigate to. I'm sure somebody could write a program that would take a skin file and parse the information into lines ready to be coded into a program. Once again nice job!

  8. #8
    Low Bitrate
    Join Date
    Aug 2004
    Posts
    76
    Quote Originally Posted by rgardjr
    Download link on website doesn't work for me.
    Does it give you any error? 404? I tested it and it worked for me.

    Try this:
    VoiceRecognition

    Let me know if that still won't work and I'll just attach the file here.

    Quote Originally Posted by rgardjr
    Looks good. I saw that you're using MediaCar and thought I'd mention an idea I had for navigating between the audio, navigation, dvd, ect... portions since it didn't appear to me that keystrokes were supported. I just wrote tiny programs that send a single mouse click to the button of the area I want to navigate to. I'm sure somebody could write a program that would take a skin file and parse the information into lines ready to be coded into a program. Once again nice job!
    I updated the grammar and created a new rule to support sending mouse clicks. It will switch to the application window you want to control first before it moves the mouse and sends a click. I have some few commands for MediaCar's main menu buttons.

    00 Galant
    armadaE500 P3-660 320M 20G, lilliput, audigy2NX, slim/slotLoad dvd/cdrw, cardReader
    sony rm-x2s, bu303, xmDirect
    xpPro sp2, frodoPlayer 1.09, iGuidance 2.0, custom voiceRecognition
    custom shutdownController

  9. #9
    Variable Bitrate rgardjr's Avatar
    Join Date
    Oct 2003
    Posts
    374
    Quote Originally Posted by djScript
    Does it give you any error? 404? I tested it and it worked for me.

    Try this:
    VoiceRecognition

    Let me know if that still won't work and I'll just attach the file here.
    The above link worked great.

    Quote Originally Posted by djScript
    I updated the grammar and created a new rule to support sending mouse clicks. It will switch to the application window you want to control first before it moves the mouse and sends a click. I have some few commands for MediaCar's main menu buttons.
    Wow! This is great news. Can't wait to get this in my car. What microphone are you using in your car and how good of job does it do?

  10. #10
    Low Bitrate
    Join Date
    Aug 2004
    Posts
    76
    Quote Originally Posted by rgardjr
    Wow! This is great news. Can't wait to get this in my car. What microphone are you using in your car and how good of job does it do?
    I'm using a regular cheap-o mic :


    I have to speak a bit louder if my windows are down or music is playing. But I can deal with that. I have a sony remote on the streering wheel column, so I hit the pause button first before I activate voiceRecognition.

    00 Galant
    armadaE500 P3-660 320M 20G, lilliput, audigy2NX, slim/slotLoad dvd/cdrw, cardReader
    sony rm-x2s, bu303, xmDirect
    xpPro sp2, frodoPlayer 1.09, iGuidance 2.0, custom voiceRecognition
    custom shutdownController

Page 1 of 2 12 LastLast

Similar Threads

  1. FP and voice recognition
    By asci01 in forum FrodoPlayer
    Replies: 3
    Last Post: 06-22-2004, 05:24 PM
  2. Voice Recognition + Database Access Over modem??
    By az1324 in forum Software & Software Development
    Replies: 1
    Last Post: 04-09-2004, 08:32 PM
  3. voice recognition (sp?)
    By blaine1605 in forum General Hardware Discussion
    Replies: 57
    Last Post: 02-04-2004, 06:59 PM
  4. Voice Recognition
    By ppgt94 in forum Software & Software Development
    Replies: 6
    Last Post: 06-26-2001, 04:21 PM
  5. Actual mp3 voice recognition that works !
    By meron in forum General Hardware Discussion
    Replies: 1
    Last Post: 04-25-2000, 10:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •