Beginning with Microsoft Windows 95 Microsoft introduced the "Speech Application Programming Interface" (SAPI). Applications that use SAPI include Microsoft Office, Microsoft Agent and Microsoft Speech Server among others.
Version History:
SAPI 1.0 - 1995
SAPI 2.0 - 1996
SAPI 3.0 - 1997
SAPI 4.0 - 1998
SAPI 5.0 - 2000
SAPI 5.1 - 2001
SAPI 5.2 - 2004
SAPI 5.3 - Expected to ship With Windows Vista
Note: Windows XP and Windows Server 2003 come with Microsoft Sam but you can also download Microsoft Mary and Microsoft Mike. To find which ones you have installed you can run this Vbs script:
Set objVoice = CreateObject("SAPI.SpVoice")
For Each strVoice in objVoice.GetVoices
Wscript.Echo strVoice.GetDescription
Next
Note: It is important to note that the scripts below will execute and read your default speech as specified in the Windows XP and 2003 Servers control panel. You can find this by looking at the speech properties and checking the Text to speech voice selection name that you have specified.
Dim strText
'WarGames
strText = "Shall We Play A Game ?"
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
Sapi.speak strText
strText = InputBox("Enter Text To Speak")
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objText = objFSO.OpenTextFile("MyTextFile.Txt", ForReading)
strText = objText.ReadAll
objText.Close
Web Page Links
Microsoft Speech Home Page:
www.microsoft.com/speech
Microsoft SAPI 5.1 SDK:
www.microsoft.com/speech/download/sdk51
Microsoft SAPI 5 Engine
http://download.microsoft.com/download/speechSDK/SDK/5.1/WXP/EN-US/speechsdk51.exe
No Comments