MSSpeech-Forum Homepage
Forum Home Forum Home > Windows™ Speech Recognition Forums > New Users & General Questions
  New Posts New Posts RSS Feed - Program ported to Win7, now gone haywire :(
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Program ported to Win7, now gone haywire :(

 Post Reply Post Reply
Author
Message
Blazio View Drop Down
Member
Member


Joined: 06/Feb/2012
Location: New Jersey
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Blazio Quote  Post ReplyReply Direct Link To This Post Topic: Program ported to Win7, now gone haywire :(
    Posted: 07/Feb/2012 at 9:26am
All,
 
I have a program that I originally built on XP. It works perfectly there. It presents passages of text to the user to read aloud, it provides excellent feedback, it's very accurate well behaved and reliable. What can I say, I'm a sucker for SAPI, I think it's one of the more amazing things I've encountered in my life.
 
Anyway, I finally ported it to Windows 7. And now things have pretty much gone haywire. I haven't been able to find good information on how to control what goes on there.
 
On xp, when I enable a reco_context, that's what's listening and that's what reacts. I'd like to achieve the same behavior on Windows 7, but I can't and I've spent days and days trying to figure it out. I see the small Speech Recognition window come up but I don't know what to do with it. I can see it correctly displaying the words that were spoken but they don't seem to go through to my enabled reco context. Sometimes they do, sometimes they don't.
 
To make it even worse, Win7 speech recognition seems to interpret some pronounced words as commands to the computer. Thus it clicks buttons, clicks tabs on the tabbed interface, everything jumps all around. It's not usable.
 
Can someone point me in the right direction. I assume I can control all of these behaviors programatically and get to where I need to be, but I don't know where the documentation for any of that would be.
 
Thanks for any help you can give
Back to Top
andy t View Drop Down
Member
Member
Avatar

Joined: 26/Apr/2009
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote andy t Quote  Post ReplyReply Direct Link To This Post Posted: 11/Feb/2012 at 12:57pm

Blazio,

The reason why your program may have worked on XP and not Windows 7 is, XP is SAPI 4 compliant (the older Microsoft speech API SAPI 4).

Whereas, Windows Vista & 7 are SAPI 5 compliant (the newer Microsoft speech API).  So your program will not work with the latter because of this reason.

Your best bet is to Google "SAPI 5" for Windows 7.  There have been several versions of SAPI 5 since it came out.  The link below from Wiki shows the different versions.

http://en.wikipedia.org/wiki/Microsoft_Speech_API

andy t



Edited by andy t - 11/Feb/2012 at 1:01pm
Back to Top
Blazio View Drop Down
Member
Member


Joined: 06/Feb/2012
Location: New Jersey
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Blazio Quote  Post ReplyReply Direct Link To This Post Posted: 19/Feb/2012 at 5:49pm

Thanks Andy but I got the answer. I was using a Shared Recognizer. Now I'm using an InProc (non-shared) recognizer. Here is the code for those who are interested. It works fine, the InProc recognizer is the only recognizer that gets reco events in Win 7 and Vista:

 
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
   Dim WithEvents RecoContext As SpInProcRecoContext
   Dim InProcRecoContextRecognizer As SpInprocRecognizer
 

Private Sub MyTestProc()
        Dim MyFirstToken As New SpeechLib.SpObjectToken
        Dim MySecondToken As New SpObjectToken
        RecoContext = New SpInProcRecoContext
        InProcRecoContextRecognizer = RecoContext.Recognizer
        Dim I As SpeechLib.SpInprocRecognizer
        I = New SpInprocRecognizer
        Dim myCategoryID As String = ""
        Dim MyCategory As New SpObjectTokenCategory

        MyFirstToken = InProcRecoContextRecognizer.GetAudioInputs().Item(0)
        myCategoryID = MyFirstToken.Category.Id
        MyCategory.SetId(myCategoryID)
        MySecondToken.SetId(MyCategory.Default())
        InProcRecoContextRecognizer.AudioInput = MySecondToken
End Sub
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.02
Copyright ©2001-2019 Web Wiz Ltd.

This page was generated in 0.188 seconds.

Microsoft Most Valuable Professional

§- Thank you for visiting our Windows Speech Recognition and Macro Forum.. -§