Here is the Coffee2 Tutorial (more or less) transcribed to ASM. I left out some of the stuff i thought was crap, and trimmed it down (ie. cut-to-the-chase ;) )

The idea microsoft was going with is that your sitting in your office and you want a coffee. So you say "goto Shop" and your are now at the coffee shop.

Since you can only order drinks at the coffee shop, it will respond to orders you give, "I would Like a Tall non-fat 2% latte" and the window will light up the properties it understood from your order. When your done, say "Goto Office" and you leave the shop. Try to order anything from here and you get no responce.

You can also say "Goto Shop, Goto Counter, Goto Store" which will all get you to the coffee shop, however only "Goto Office" will leave.

:grin: :grin:
The command structure has 'rules' at top level. There is one RULE that defines all coffeshop stuff, and another that defines Navigation. Navigation is always enabled, however coffeeshop rules are disabled when away in the office and reenabled on return.

Each rule is has sub properties like <o> for optional words and <p> property words. XML is used to define the overal structure of commands available and can be viewed in the coffee.xml file. The XML file gets compiled into a .cfg file and assembled into the resouce area for use. The XML file is called a GRAMMAR file cause it defines the spoken grammar that invokes command responses.

The file GC.EXE is the GRAMMAR COMPILER. Use this to make new grammar definitions, but you need to have SAPI 5 installed to do so.

Enjoy.. Let me know if you like the example and if there is any hangup's!
If you do get a prob, let me know your OS and the EIP of the fault.
:alright:
NaN
Posted on 2002-12-09 21:08:37 by NaN
NaN,
Just wanted to let you know that it runs fine on Win2K.
Thanks for your effort in porting this to Asm.
I must say I am impressed at the recognition hit rate I'm seeing, probably around 95%.( I've only gone thru 1 traning session). I guess I just did'nt expect it to do that well. When I get time I'll dive into the code more.

Thanks again
Posted on 2002-12-11 18:06:12 by Wayne
Glad you like... i know i do.. its already sent my mind thinking in different directions ;)


SPPHRASEPROPERTY
SPPHRASEPROPERTY stores the information for one semantic property. It can be used to construct a semantic property tree.


struct SPPHRASEPROPERTY
{
const WCHAR *pszName;
ULONG ulId;
const WCHAR *pszValue;
VARIANT vValue;
ULONG ulFirstElement;
ULONG ulCountOfElements;
const SPPHRASEPROPERTY *pNextSibling;
const SPPHRASEPROPERTY *pFirstChild;
char SREngineConfidence;
char Confidence;
};


The sample i provided uses this structure alot to determine the actual word interperited. Notice the Confidence field... This is an output from the SR engine that tags how reliable it thinks this result is.. so you can further filter the incomming events to only high reliability, where you would find even better Accuracy between what you say, and what you get...

I didnt cause i didnt think it was warented to demonstrate the basic requirements to get the engine going, and would have added more "clutter" in the code ;)

However, use it if it can help...
:alright:
NaN
Posted on 2002-12-13 18:21:30 by NaN
I am impressed !!
I suggest that your Semantic Tree would resemble closely the kinds of trees found in Natural Language parsers and some hierarchabetical (heh) databases... the Tree could be set up as a neural network, with feedback provided by the end-user compared against the Confidence values being back-propagated though the network... now the system can "learn" the idiosyncratic speech of the user.
It will get better with "training". I assume that's how those things work..
Posted on 2002-12-17 06:32:35 by Homer
Yes there is an Inteface with the SR engine to recompile grammars (to effectifly make additons and 'feedback')...

Glad you like it, let me know if you get something working ;)

:alright:
NaN
Posted on 2002-12-17 16:43:54 by NaN