Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: check if 5 min have passed Pin
Luc Pattyn15-Mar-10 14:01
sitebuilderLuc Pattyn15-Mar-10 14:01 
GeneralRe: check if 5 min have passed Pin
Yustme15-Mar-10 14:08
Yustme15-Mar-10 14:08 
GeneralRe: check if 5 min have passed Pin
Luc Pattyn15-Mar-10 14:12
sitebuilderLuc Pattyn15-Mar-10 14:12 
GeneralRe: check if 5 min have passed Pin
Yustme16-Mar-10 3:17
Yustme16-Mar-10 3:17 
GeneralRe: check if 5 min have passed Pin
Luc Pattyn16-Mar-10 3:56
sitebuilderLuc Pattyn16-Mar-10 3:56 
GeneralRe: check if 5 min have passed Pin
llandyw16-Mar-10 15:26
llandyw16-Mar-10 15:26 
GeneralRe: check if 5 min have passed Pin
Som Shekhar16-Mar-10 20:30
Som Shekhar16-Mar-10 20:30 
QuestionMicrosoft SAPI, Parsing grammar xml with c# Pin
b0bz15-Mar-10 9:40
b0bz15-Mar-10 9:40 
I run into a little problem I'm not too sure how to get around.

Let's say I have this grammar xml:

<GRAMMAR LANGID="409">
  <DEFINE>
    <ID NAME="RID_A" VAL="0"></ID>
    <ID NAME="RID_B" VAL="1"></ID>
    <ID NAME="RID_C" VAL="2"></ID>
    <ID NAME="RID_D" VAL="3"></ID>
    <ID NAME="RID_E" VAL="8"></ID>
  </DEFINE>
  <RULE NAME="A" ID="RID_A" TOPLEVEL="ACTIVE">
    <P>something</P>
  </RULE>
  <RULE NAME="B" ID="RID_B" TOPLEVEL="ACTIVE">
    <P>go</P>
    <P>
      <RULEREF REFID="RID_C" />
    </P>
  </RULE>
  <RULE NAME="C" ID="RID_C">
    <L PROPID="RID_C">
      <P VAL="RID_D">left</P>
      <P VAL="RID_E">right</P>
    </L>
  </RULE>
</GRAMMAR>


So basically, there are 3 commands, "something", "go left", "go right".

Whenever something gets recognized this gets called:

public void RecoContext_Recognition(int StreamNumber, object StreamPosition, SpeechRecognitionType RecognitionType, ISpeechRecoResult e)


Inside of it I'm using a switch switch (e.PhraseInfo.Rule.Name). For the rules similar to the "something" command, a simple case "A": is all I need.

My issue comes now. For the "go left" or "go right", the case "B": catches them. However, I have no idea how to determine the 'right' or 'left' part of it.

Ideally, this is what I'm looking for.

[ create ] -> one | two | three -> monkeys | elephants | puppies.

Obviously not those examples, but something that follows that path. Can I accomplish that with the sample XML I provided and the switch in the function? Or do I need a different approach?
Questionhand gesture recognition Pin
Innayat Ullah15-Mar-10 7:39
Innayat Ullah15-Mar-10 7:39 
Questionupdate tables Pin
netJP12L15-Mar-10 6:16
netJP12L15-Mar-10 6:16 
AnswerMy up and coming vote of 1. PinPopular
Keith Barrow15-Mar-10 6:26
professionalKeith Barrow15-Mar-10 6:26 
GeneralRe: My up and coming vote of 1. Pin
netJP12L15-Mar-10 6:42
netJP12L15-Mar-10 6:42 
GeneralRe: My up and coming vote of 1. Pin
Keith Barrow15-Mar-10 6:45
professionalKeith Barrow15-Mar-10 6:45 
GeneralRe: My up and coming vote of 1. Pin
OriginalGriff15-Mar-10 6:56
mveOriginalGriff15-Mar-10 6:56 
GeneralRe: My up and coming vote of 1. Pin
#realJSOP15-Mar-10 7:50
professional#realJSOP15-Mar-10 7:50 
GeneralRe: My up and coming vote of 1. Pin
The Man from U.N.C.L.E.15-Mar-10 7:45
The Man from U.N.C.L.E.15-Mar-10 7:45 
AnswerRe: update tables Pin
JHizzle15-Mar-10 23:52
JHizzle15-Mar-10 23:52 
QuestionCalling particular instance form method from another form Pin
polyconnect15-Mar-10 4:44
polyconnect15-Mar-10 4:44 
AnswerRe: Calling particular instance form method from another form Pin
DaveyM6915-Mar-10 4:54
professionalDaveyM6915-Mar-10 4:54 
AnswerRe: Calling particular instance form method from another form Pin
Not Active15-Mar-10 4:59
mentorNot Active15-Mar-10 4:59 
GeneralRe: Calling particular instance form method from another form Pin
DaveyM6915-Mar-10 5:10
professionalDaveyM6915-Mar-10 5:10 
GeneralRe: Calling particular instance form method from another form Pin
polyconnect15-Mar-10 7:53
polyconnect15-Mar-10 7:53 
Questionmaking a microprocessor simulator in C# Pin
Djtech0115-Mar-10 2:52
Djtech0115-Mar-10 2:52 
AnswerRe: making a microprocessor simulator in C# Pin
OriginalGriff15-Mar-10 3:45
mveOriginalGriff15-Mar-10 3:45 
GeneralRe: making a microprocessor simulator in C# Pin
Djtech0115-Mar-10 4:11
Djtech0115-Mar-10 4:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.