Add new word to windows speech recognition using C#

旧时模样 提交于 2019-12-07 21:24:27

问题


i know how to use speech recognition in C# but the problem is how to add a special word or name into windows speech dictionary database? in windows 7 and 8 you can do it easily using:

Opening Speech Dictionary > Add new word > Enter the Text of word > Record the pronunciation of the word by Microphone

and then,it's OK! the word will add to database. we also can edit the word using the Speech Dictionary. does anyone know how can we do these steps with .NET and programming?

EDIT: its very simple, windows speech dictionary has limited database , how can we add some other words into this via .NET C#? for example name "Salad" doesn't exist in windows speech dictionary. how can i add this word and its pronunciation into windows speech dictionary?

sorry i'm a bit new to this great site.


回答1:


You'll need to use the SAPI Automation APIs (aka SpeechLib) to access the ISpLexicon interfaces.

In particular, ISpLexicon::AddPronunciation will add a new word (and its associated pronunciation) to the user lexicon.



来源:https://stackoverflow.com/questions/20546087/add-new-word-to-windows-speech-recognition-using-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!