0

我可以使用听写资源工具包或此处给出的说明来创建替代听写语法。我无法使用 C++ 加载新的听写主题。我正在尝试修改随 sapi5.1 sdk 提供的 simpledict 示例。以下不起作用。

std::wstring stemp = s2ws("语法:听写#流派");  
    LPCWSTR mygrammar = stemp.c_str();
    hr = m_cpDictationGrammar->LoadDictation(mygrammar, SPLO_STATIC);
4

1 回答 1

1

假设您的新听写语言模型名为“流派”,

hr = m_cpDictationGrammar->LoadDictation(L"Genre", SPLO_STATIC);

应该做的伎俩。

于 2010-03-22T21:45:13.977 回答