Search code examples
c#speech-recognitionsapi

ISpeechRecognizer.DisplayUI


I tried to use ISpeechRecognizer.DisplayUI from SAPI 5.4 in C# for bringing the Add Pronunciation UI and it brings the UI but it will be without the given word, which is in this case the word "example".

SpSharedRecoContext ssrc = new SpSharedRecoContext();
ISpeechRecognizer ispSpeechReco = ssrc.Recognizer;
ispSpeechReco.DisplayUI(this.Handle.ToInt32(), "Additional Pronunciation", "AddPronunciation", "example");

Solution

  • When the typeOfUI is "AddPronunciation", the implementation ignores the extra data parameter. See this blog post for details on which typeOfUI parameters support extra data.