Litespeak Thread last updated on 2006-04-10 13:42:50

Posted by member 302889 on 2006-04-10 13:13:08

Hi all,

i am trying to get the litespeak-2.0 module working, hopefully 'patheticgeek' or someone else can help me.

I have successfully loaded the the module (it shows it as being loaded in 'litestep->about') and installed the microsoft text to speech engine. I have also put the mstts.dll file in the litestep folder and the windows\system32 folder and set up some bang commands to test it.

When i open winamp, litespeak should say 'Opening Winamp' and the reverse when i close winamp but i'm getting no audio.

I also don't get any audio when litestep opens and litespeak is meant to play the welcome message (My God, its' full of stars).

can anyone tell me if i've put the mstts.dll file in the right place and if there is anything i have missed or give me any help with debugging this?

this is a line from one of my bang scripts

*Script exec !Speak Opening Winamp

and i used a *NetLoadModule command to load the module.

This module seems quite interesting so i would like to get it working if possible.

The readme.txt file is really basic and isn't too helpful about how to set it up.

cheers for any help you have.

Posted by member 212670 on 2006-04-10 13:34:50 link

Are you running WinXP? If so, use lspeakxp.

Posted by member 5575 on 2006-04-10 13:42:50 link

I'm not sure how current litespeak is - it may be trying to use the MS SAPI4 components, and chances are you've got SAPI5 installed on your PC, unless it's fairly antique. If all you want to do is basic text-to-speech you can do it with a simple vbscript, then call it like so:

!execute [wscript $personaldir$Scripts\speak.vbs "I'm sorry Dave, I'm afraid I can't do that."]

The script looks like this (save it to a file named speak.vbs):

'---
' Declaring variable to hold SAPI object.
'---

Dim spkr, mesg

On Error Resume Next ' skip to next line on error

'---
' Creating SAPI object using spvoice.
'---

Set spkr = WSCript.CreateObject("SAPI.SpVoice")

If err.number 0 Then
MsgBox "You do not have Microsoft Speech installed."
WScript.Quit
Else
' everything's ok
End If

On Error GoTo 0 ' reset error handling
Err.clear ' in case we have more code, we clear the current error

'--- Voice and language selection:
'--- American English = 409
'--- British English = 809

'--- By *not* selecting a name here, we use the default voice specifed in the
'--- user's 'Speech' control panel applet.

Set spkr.voice = spkr.GetVoices("Language=409").Item(0)

'--- If you want to change the voice, then uncomment one of the following lines.

'Set spkr.voice = spkr.GetVoices("Name=Microsoft sam" , "Language=409").Item(0)
'Set spkr.voice = spkr.GetVoices("Name=Microsoft mike", "Language=409").Item(0)
'Set spkr.voice = spkr.GetVoices("Name=Microsoft mary", "Language=409").Item(0)

If WScript.Arguments.count > 0 Then
mesg = WScript.Arguments.item(0)
Else
mesg = ""
End If

'--- You can set other parameters and properties like voice pitch, speed etc.

spkr.Volume = 75 ' 0 100
spkr.Rate = 1. '-10 +10
If (Len(mesg) = 0) Then
mesg = "You didn't give me anything to SAY, you doofus."
spkr.Rate = 2.
End If

'--- Using speak function of SpVoice to speak a string.

spkr.Speak(mesg)

'--- Destroy voice object.

Set spkr = nothing

Wscript.Quit