Jump to content
  • Advertisement
Sign in to follow this  
SBD

SAPI rule enumeration

This topic is 621 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been using the Microsoft Speech API (SAPI, 5.3) to add speech recognition support to my game (Windows, obviously, C++, Win8 SDK) and aside from a few hoop-jumps relating to loading grammar files it's working quite well.

 

However, I'm having trouble figuring out how to enumerate rules from a grammar that was loaded from file (or if that's even possible).  Obviously, when you build the grammar manually/dynamically, you are creating the rules yourself.   However, there doesn't *appear* to be a way to enumerate the rules from a grammar that was loaded from file.  IspRecoGrammar::GetRule() seems to be the closest thing I could find to being able to query for a rule, but it is intended for retrieving a single, known rule (it requires either a rule name or id).

 

For the time being I'm simply parsing the XML myself and plucking out the rule names, but that's not really a complete solution; I need to support both XML *and* binary grammar config files, the latter of which sidesteps my current work-around.

 

Anyone with SAPI experience know how I might accomplish this?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!