DisplayUI and the Extra Data parameters

Hardcore SAPI programmers know that you can show the various SR engine user experiences (user training, microphone training, and so forth) using ISpRecognizer::DisplayUI.  (Even harder-core SAPI developers know that the real function is ISpObjectToken::DisplayUI, and that ISpRecognizer::DisplayUI simply forwards to the token of the loaded engine, but I digress…) Most of the examples for DisplayUI…

0

The history of UI Automation

Raymond Chen wrote a post about retrieving the text under the cursor using UI Automation, and he had a comment that “Some people are under the mistaken impressions that UI Automation works only for extracting data from applications written in managed code.  That is not true.” Well, sort of. UI Automation was first released with…

0

Lexicons and Command Grammars

If you have a command grammar, and you need a word with an unusual pronunciation, you can use the PRON attribute of the <PHRASE> tag to specify a pronunciation using either a phoneme representation or an explicit array of PhoneIDs (phoneme identifiers) that you have extracted from the SpPhoneConverter (the SAPI default converter between phoneme…

0

Training versus Lexicons

I’ve received a number of requests from people who want to train the recognizer from wave files.  I’ve helped them, but one thing I’ve come to realize is that they’re confusing training with lexicons. In particular, training the engine will not add new words to the vocabulary. Training the engine from a set of wave…

0

The Complete Metropolis

The most influential SF movie of all time (referenced and ripped off by everyone from Kubrick to Besson) is finally available in a complete edition.  Fritz Lang’s 1927 masterpiece has only been available in incomplete form (and for decades was only available in a heavily re-edited version). Two years ago, curators at the Buenos Aires…

0

Detecting Sleep Mode in SAPI

If you’ve done any development with the shared recognizer, you’ve probably had problems determining when the shared recognizer is in sleep mode. Determining when the shared recognizer is OFF is easy enough; ISpRecognizer::GetRecoState will return SPRST_INACTIVE. But figuring out the sleep state is much harder.  That’s because the shared recognizer is active (SPRST_ACTIVE_ALWAYS), but it’s…

0

How to train the SAPI recognizer

Implementing SAPI training is relatively hard, and the documentation doesn’t really tell you what you need to know. ISpRecognizer2::SetTrainingState switches the recognizer into or out of training mode. When you go into training mode, all that really happens is that the recognizer gives the user a lot more leeway about recognitions.  So if you’re trying…

4

That pesky terminating composition

If you’re developing a text service for Windows XP, you’ve likely found that your composition gets terminated unexpectedly whenever you have more than one character.  On English, you can avoid terminating your composition by making sure that every character in the composition has the GUID_PROP_COMPOSING property associated with it, by making sure that you call…

0

Specifying parameters for an inproc Recognizer

I’ve seen a couple of questions come by the listen alias about using an in-process speech recognizer.  When you use an in-process recognizer, you have to specify a lot more than you need to specify with the shared recognizer. In particular, you need to specify an audio source and a recognition engine.  The shared recognizer…

0

Finding out when WSR shows a window (or, a concise guide to IUIAutomationRegistrar)

When WSR shows a window (for example, the alternates dialog, the Disambiguation Numbers UI, or the dictation scratchpad), that window does not take focus.  These windows do not take focus because these windows could alter the state of the application that WSR is talking to.  For example, if you’re renaming a file in Windows Explorer,…

0