Win32::SAPI4 - Perl interface to the Microsoft Speech API 4.0
use Win32::SAPI4; my $vt = Win32::SAPI4::VoiceText->new(); my $dss = Win32::SAPI4::DirectSpeechSynthesis->new(); my $dsr = Win32::SAPI4::DirectSpeechRecognition->new(); my $vtel = Win32::SAPI4::VoiceTelephony->new(); my $vd = Win32::SAPI4::VoiceDictation->new(); my $vc = Win32::SAPI4::VoiceCommand->new();
This module is a simple interface to the Microsoft Speech API 4.0. It just offers 6 constructors to the different parts of this API, along with a few utility methods for the VoiceText class. This documentation won't offer the complete documentation for it, just download the Microsoft Speech API 4.0 SDK and read the Visual Basic documentation. It's all there, except for the few convenience methods I added to Win32::SAPI::VoiceText.
The Microsoft Speech API 4.0. It can be downloaded for free from http://www.microsoft.com/speech (go to the 'old versions' and find the 4.0 version)
See the Microsoft Speech API 4.0 Visual Basic documentation for all methods, properties and events available, except the following:
This is the constructor for each and every subclass. It doesn't take any parameters
All classes support the GetObject method which returns the actual Win32::OLE object. This may be useful when you need to pass the object as a parameter to another class' methods.
This method returns a list of all installed languages with their countryname. It may look like ('Dutch (Netherlands)', 'Dutch (Belgium)', 'English (United States)', 'Portuguese (Brazil)'). Some speechengines (notably the Fluency TTS engines) don't return a languageID. In this case 'unknown' is returned.
This method takes a language as returned by GetInstalledLanguages and returns a list of all installed voices with their language. It may look like ('Adult female (Dutch)', 'Microsoft Sam (US English)')
This method takes a language as returned by GetInstalledLanguages and returns the corresponding LanguageID that VoiceText knows. This also converts the 'unknown' that might be returned by GetInstalledLanguages back to a 0.
This method takes a voice as returned by GetInstalledVoices and returns the corresponding ModeID that VoiceText knows.
The Microsoft SAPI 4.0 SDK is supported on news://microsoft.public.speech_tech.sdk You can email the author for support on this module.
Jouke Visser firstname.lastname@example.org http://jouke.pvoice.org
Copyright (c) 2003-2004 Jouke Visser. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl(1), Microsoft Speech API 4 documentation.