Sign in to follow this  
Ranthalion

SAPI LoadCmdFromFile question

Recommended Posts

I'm using the Microsoft Speech SDK for a voice command project with VC.NET. When my program starts up it should load a grammar file during initialization. Now, I thought I understood very well what I was doing here, but for some reason, I can't get it to work. When I make the call to LoadCmdFromFile, it always returns E_INVALIDARG, which means "FileName is invalid or bad. Alternatively, Options is neither SPLO_STATIC nor SPLO_DYNAMIC" I'm calling it like this: g_Grammar->LoadCmdFromFile(L"mygrammar.xml",SPLO_DYNAMIC); I know the file exists because I have created it and put in the project directory and the debug directory. I have even tried putting the entire pathname, "C:\\project\\mygrammar.xml" in the function call, but I always get the same error when I try to run the program. Any ideas on what is causing this, or how I can get it to work? Thanks Ranthalion

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this