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...

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...

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...

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...

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...

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...

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...

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...

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...

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...

In a previous post , I mentioned that you need to set the GUID_PROP_COMPOSING property across text in a composition, or else Windows XP will terminate the composition. That’s true. I then provided a code snippet to set that property. That snippet is wrong...

Now that the Beta of Windows 7 is out, it’s time to talk about the improvements and new features in Windows Speech Recognition.
For Windows 7, we focused primarily on improving the user experience and removing the “rough spots” that we did not have...

The TSF samples (long missing from MSDN) have finally been uploaded to the MSDN Code Gallery . The documentation is also available (in plain-text form) in each sample. MSDN’s web page should be updated soon to point to the code gallery.

Many people have emailed me asking about the TSF samples on MSDN. They’re supposed to be on MSDN code gallery, although they don’t appear to be there. They are, however, part of the Windows SDK . After installation, you'll find them in %programfiles...

One common cause of dictation not working is that CTFMon is not running. This is a helper process used by the Text Services Framework to implement things like global compartments and the like. If dictation is not working, try running this command...

I’ve heard from a number of sources that there isn’t any good documentation about the ‘inline’ dictation commands. These commands can be uttered in the middle of a dictation stream (in other words, you don’t have to stop speaking to use these commands...

David LeBlanc wrote an excellent overview of encrypted documents in Office. A long, long time ago, I worked on the Word conversions team (it wasn’t even called Office then). As part of my job, I wrote a document encryption filter. More...

Well, for one thing, it’s not that great for grabbing the current selection in the foreground application.
There are several problems here:
1) You have to get your text service loaded into the target application. This can be slow.
2) Once your...

WSR Dictation should always work in Wordpad. If you're having problems with dictation, make sure it works in Wordpad. If dictation doesn’t work in WordPad: 1) Start regedit, go to the key HKEY_CURRENT_USER\Software\Microsoft\Speech...

In an earlier post on keyboards , I talked briefly about text service categories. I'd like to talk more about categories. TSF will make sure that at most one text service in any category is enabled at any given time. So, for example, you can enable...

If you're building a text service DLL, you almost certainly don't want to use Visual Studio 2008's compiler. The problem is that Visual Studio 2008 uses a new C Runtime Library, and if you build your text service with Visual Studio, your text service...

I recently had two people ask me the same question:
"Why can't I insert more than one character into a composition on Notepad?"
It's actually a bit more complicated than that, since this behavior only appears to happen on Windows XP with a US English...

If you've tried to use the modified version of Scintilla that I described in my MSDN article , you will find that the zipped sources don't actually have the changes that I made. That was my fault; when I was packaging the sources, I had two versions of...

I got caught by this recently. ITfCompartmentEventSink::OnChange means what it says. If you repeatedly store the same value into a global compartment, the event sinks will not fire. If you store a different value into the compartment, the event sinks...

I've been working with compartments recently, and I've run across a few 'features' that tripped me up. I figure if I've run across them, others have too. Although MSDN says that you can put integers, BSTRs, and interface pointers into a compartment, you...