Microsoft Speech API

jouke on 2004-09-29T07:08:16

The Microsoft Speech API (SAPI for short) comes in a few different versions. The oldest version that's still available for download from MS, 4.0a, is a rather simple interface for all kinds of speech things like speech recognition and speech synthesis. To support different speech synthesis engines for th e Microsoft Agent (also free from MS), I needed to write a Perl interface for SAPI4. This became Win32::SAPI4.

Now, beside voices that are compatible with SAPI4, I also want to support Speech API 5 compatible voices in pVoice. For example, Kevin Lenzo's company Cepstral sells voices that are SAPI5 compatible. You guessed it, now there's also Win32::SAPI5. Just like Win32::SAPI4 it's a very simple module that offers constructors to the various objects defined in the API, which return Win32::OLE objects on which you can call the methods and properties of these objects. It's simple, but it works fine. For example, you can do something like this: my $voice = Win32::SAPI5::SpVoice->new(); $voice->Speak("hello world"); Now, that's easy enough, isn't it?