Well, im pretty impressed...

I got the Speech Recognition engine working in MASM32 in just under 130 lines of ASM!! (( You should see how many lines of C++ source i was working with :eek: )

Anywho, the front end of the Speech Recognition (SR) Engine is pretty lame a the moment, as im simply using VKIM's debug... However, if people are interested, i can take a moment and cut n' paste the code into a simple window (so people can learn from)...

Let me know if your interested... (I would post an example, but its is really in no shape to be posted at the moment ;) )

An idea that just came to mind: perhaps i can wrap up the entire thing into a LIB, such that it operates as a black box.. (( You simply get WM_RECOGNITION events, with lParam haveing the address of the text ))??

I dunno... just happy its working!
:alright:
NaN
Posted on 2002-12-02 19:07:35 by NaN
wow! i'm impressed, too!

you mean to say you've got the part of the program that takes sound and then analyses it to get phenomes in under 130 lines?! neat! i've got this big gray book that i bought on sale for $2.99 (Can) in Edmonton on speech recognition. i can't even begin to understand anything past the first couple of pages. maybe in a few years i might :) anyway, at $2.99...
Posted on 2002-12-02 20:02:47 by jademtech
Afternoon, Nan.

The code itself would be fine :grin: .

This would be *very* useful:).

Cheers,
Scronty
Posted on 2002-12-02 20:39:17 by Scronty
Here is working source.

The areas of interest are nicely contained in separate functions... (only 3: Init, Destory, and Process).

The program does nothing, but simply respond to your commands with menu items (File, Exit, Help, and About).

As well i have a static text window that will show you what it thinks you said ;)

Enjoy.. Its basic, and to the point..
Anywho, im tired and since this is a good "save point", im calling it a night ;)
:alright:
NaN

Posted on 2002-12-02 23:08:08 by NaN
Wow, 30 downloads and not a single piece of feedback ;)

Anywho, to my surprise there is alot more flexibility with the SR engine than i realized.. I just dug up how you can define certian 'words' for command purposes to narrow the range of outputs to a select few. Basically, like an RC file defining the menu items, you define the menu spoken names, and help eliminate the guesses. Further to this point, you can also define multiple contexts, such that one context is for all speech (as the above file is defined), and another context that would hold only the select few 'command' words to work with in its translation. This is quite useful for menu's etc., and im reading, it can be compiled into an RC file such that the user can not change this 'speech config' file. (( cool :) )).

Looks like i will need to make a compiler for this, but it shouldnt be too hard..

Anyways, i hope your enjoying this little toy...

:alright:
NaN
Posted on 2002-12-04 03:10:27 by NaN
feedback: it GPFs on my system (NT4SP6). i think i dont have the SR engine.
some checks would be nice :grin:
Posted on 2002-12-04 04:24:42 by TBD
Yes, obviously you need the SR installed... i mentioned this in the last thread.

The downloads are here: http://www.microsoft.com/msagent/downloads.htm

I recommend getting one of all on the page, but you only need the SAPI, And SR engine. I have Text to speech stuff posted in another thread (used SAPI).

As for error checks, ya, i should, but then agian this isnt a final demo or anything, this is something quick and painless to give people ideas/direction... sorry for th GPF, I guess i should have mentioned such.. :tongue:

NaN
:stupid:
Posted on 2002-12-04 17:13:46 by NaN
I recomend downloading the SDK, since it has a nice .CHM with all the SAPI interfaces documented. However, if you want to play around a bit here is the online location of the same information:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesapi/htm/ceoriSpeechAPISAPIVersion50.asp

(( If you downloaded the above SR.ZIP, you have my Rev 1.1 SAPI.COM file ))

This should hopefully give people all they need..
:alright:
NaN
Posted on 2002-12-04 17:28:23 by NaN
Afternoon, NaN.

Trying to reassemble the example.
What/where are these defined as?
CLSCTX_SERVER
CLSCTX_ALL
?

Also: doesn't seem to work on my 'puter yet.
(yes: I've got the SAPI installed, and have successfully run the SAPI examples).

Cheers,
Scronty
Posted on 2002-12-04 18:07:28 by Scronty
This is what i have in my Windows.inc (under the OLE Stuctures and Equates Section)
CLSCTX_ALL equ CLSCTX_INPROC_SERVER or CLSCTX_INPROC_HANDLER or CLSCTX_LOCAL_SERVER
CLSCTX_INPROC equ CLSCTX_INPROC_SERVER or CLSCTX_INPROC_HANDLER
CLSCTX_SERVER equ CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER


I've also attached my Windows.inc... Its Odd tho, I dont remember placing these entries??

As for not working? Im stumped.. Here is a recompled version with com checks....
(Perhaps you need the control panel as well??)

:alright:
NaN

Posted on 2002-12-04 19:17:59 by NaN
oops forgot the Windows.inc version:
Posted on 2002-12-04 19:21:10 by NaN
Scronty,

I revised the COM error macros to make the source more readable... (also free'd up a few bytes)..

This is the same as the SR2.ZIP, however the Errors are listed with the COM call, so you can follow more what is going on/wrong ;)

Hope this is more help...
PS: The Error macros are now in the COM32.INC

Let me know what your error is...
:alright:
NaN
Posted on 2002-12-04 19:52:37 by NaN
Here is a link to the SAPI reference that comes with the SDK... Its quite useful, and will help you understand what is going on...

PS: Sorry if the download sux, geocities is the best i have at the moment :rolleyes:

http://www.geocities.com/cacain009/index.htm

Enjoy
nAn
Posted on 2002-12-04 22:39:57 by NaN
Woo Hoo!

Oh is this getting fun ;)

I got context commands figured out!! Basically, a print menu, dialog box, whatever can all have a separate 'context' interface that is created and destroyed with the GUI object. Each context is loaded with a narrowly defined grammer set of words it can work with (taylored to the GUI object, like a menu bar). This speeds up the engine considerably and make hits alot more reliable!..

(( Oh ya, the 'gammer's that is specific to GUI files are defined in an XML file, so its easy to create and modify. As well, the SDK provides a tool to compile the XML file to a binary, and can be compiled as an RSRC and loaded from the instance, or externally load the uncompiled XML via dialog box!!))

This is getteing pretty good!
Hope those who d/l'd the package feel the same ;)
:alright:
NaN
Posted on 2002-12-04 23:14:52 by NaN
Here is a version with these narrowed grammers... its alot faster, but still has a few bumps to pound out...
Posted on 2002-12-05 00:00:00 by NaN
Were here. Just trying to understand this stuff.

;)
Posted on 2002-12-05 00:02:58 by Xtreme
Scronty,

Did you manage to get it working yet??

Anyone get it working? or have tried?

Im still developing this, and found a handful of turorials.. I can transcribe them to MASM if people want them.. but if not...

:alright:
NaN
Posted on 2002-12-06 17:13:13 by NaN
Hi NaN,

Trying sr4 on Win2k. I get no 'com' errors and the window shows up, but that's it. I'm not getting any WM_RECOEVENT's.

Doing some reading now to figure out how it all works.

SR works with other app's so it must be installed correctly.

Wayne
Posted on 2002-12-06 18:15:18 by Wayne
I guess I am getting a ISpObjectTokenCategory_SetId error.
I had to change your IF_COM_ERROR to capture it.
changed '.if eax == 1 ' to ' .if eax != 0' to trigger on error codes returned.

I will continue on tomorrow.
Posted on 2002-12-06 19:05:54 by Wayne
Thanx for catching this.. i feel dumb for writing it that way... sorry :rolleyes:

As well, i did some snooping on the proper way of distributing this SAPI stuff (with out making the end user install the SDK)..... but im not getting to far.

Do you have a file on your HD:
C:\Program Files\Common Files\SpeechEngines\Microsoft\SR\1033

THis is where all the english SR stuff is (1033 = English).

It should have been installed by your downloaded installer for the SR engine off the MS web page...?

Just a shot in the dark really.
keep me informed..
:alright:
NaN
Posted on 2002-12-06 19:59:22 by NaN