SAPI Grammar C++ Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I dont know if this is the right place to ask so sorry if not but i have a
problem trying to use SAPI and wondered if anyone could help.

I can connect to all the COM components fine and I can get a callback
working in dictation mode but i cant load a grammar... when i use

hr = g_cpCmdGrammar->LoadCmdFromResource(NULL,
MAKEINTRESOURCEW(IDR_CMD_CFG),L"SRGRAMMAR", MAKELANGID(LANG_NEUTRAL,
SUBLANG_NEUTRAL),SPLO_DYNAMIC);

and try to load the compiled XML grammar file from the resource file I get
and HRESULT of "The specified resource type cannot be found in the image file"

when i use

hr = g_cpCmdGrammar->LoadCmdFromFile(L"c:\grammar.cfg", SPLO_STATIC);

To load it from disk (i know its there!) I get a HRESULT of "The specified
file cannot be found"

Doh!
 
Back
Top