visual studio - How to register .dlm and .ngr files generated in Dictation Resource Kit in Windows 7? -
i using windows dictation resource kit , have geneated .dlm , .ngr files of medical model , how register these dictation topics in windows 7, know if there way straight load them in program?
you need register topics under engine guid key. english, key is
hklm\software\microsoft\speech\recognizers\tokens\ms-1033-80-desk\models\1033\l1033\lms\addon create reg_sz key name dictation topic name, , value path .dlm/.ngr (both files need in same directory).
for example, if dictation topic named "medical", , path in "c:\medical", reg key
hklm\software\microsoft\speech\recognizers\tokens\ms-1033-80-desk\models\1033\l1033\lms\addon\medical = c:\medical to specify dictation topic in code, need specify topic name when loading dictation grammar.
for c# (using system.speech.recognition), code looks this:
string topic = "grammar:dictation#medical"; dictationgrammar dg = new dictationgrammar(topic); in c++, using native sapi,
isprecogrammar* pgrammar; // initialize pgrammar before use... hresult hr = pgrammar->loaddictation(l"medical", splo_static); if want new topic show in windows speech recognition, need update
hkcu\software\microsoft\speech\preferences\dictationlanguagemodels and add together value name topic name, , value display value. example, if topic "medical" , wanted appear "medical dictation", have
hkcu\software\microsoft\speech\preferences\dictationlanguagemodels\medical = "medical dictation" visual-studio speech-recognition sapi
No comments:
Post a Comment