Program ported to Win7, now gone haywire :( |
Post Reply |
Author | |
Blazio
Member Joined: 06/Feb/2012 Location: New Jersey Status: Offline Points: 2 |
Post Options
Thanks(0)
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
|
|
andy t
Member Joined: 26/Apr/2009 Status: Offline Points: 134 |
Post Options
Thanks(0)
|
Blazio,
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. Edited by andy t - 11/Feb/2012 at 1:01pm |
|
Blazio
Member Joined: 06/Feb/2012 Location: New Jersey Status: Offline Points: 2 |
Post Options
Thanks(0)
|
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
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |