Software Archive
Read-only legacy content
17061 Discussions

Combining free form diction and a grammar in the speech recognition API

Twied
Beginner
366 Views

I don't see a way or any example in the Real Sense SDK to combine diction and a command grammar, the example gets either - or, but not both.  In my research I didn't see a way to define a wildcard in the JSGF files where grammars are created.

 

The situation I'm trying to figure out closely resembles Google's speech recognition, i.e. "Ok, Google"..."Search X" - Let's say X = "Real Sense SDK"

 

I can pretty easily create a grammar for the first few parts but that doesn't seem to allow me to capture the free form diction part of the search query that could be any search term. I'd like to let the SDK do the hard work of identifying that I've started with a grammar, but also tell me the variable/wildcard piece at the end. Is that a shortcoming of JSGF?

 

Should I be trying to switch between the 2 modes as the sentence is being spoken?

 

Any advice or URLs would be great.

0 Kudos
2 Replies
Xusheng_L_Intel
Employee
366 Views

I will talk with my colleaguse and see if it is feasible or there is any workaround. I will be back to you when I get any from them. Thanks!

0 Kudos
Anastasiya_P_Intel
366 Views

RealSense SDK supports JSpeech Grammar Format (JSGF) (https://www.w3.org/TR/jsgf/). Everything which is supported by JSGF, is supported by RealSense SDK. As you can see in JSGF standard, wildcards are not supported by JSGF.  

Also, unfortunately it’s not possible to switch between the "Command and Control" and "Dictation" modes.
But to resolve the issue you can run two sessions in different modes in parallel and match results. 

0 Kudos
Reply