Page 1 of 1

Error: Could not speak text: Invalid parameter.

PostPosted: Mon Nov 01, 2010 10:11 am
Hey there,

I am using swift on a webserver running Linux.
The current kernel version seems to be:
Linux #1 SMP Sun Oct 31 14:12:10 CET 2010 i686 GNU/Linux

Unfortunately swift does not work properly.

Each time I call the swift shell script bin/swift, I get the error message "Error: Could not speak text: Invalid parameter.". The command "./swift --say-all-voices -o test.wav" works perfectly which means that swift must be installed correctly.

The problem seems to be the parameter transfer from the command line to the swift script.

I have tried several things already, including switching from #!/bin/sh to #!bin/bash, no success so far.

Any help is highly apprechiated.
Thanks in advance and best regards.

PostPosted: Thu Nov 04, 2010 9:42 am
by AdamW
Please post a simplified version of the actual invocation of swift that causes the error. No trade secrets please. Our assumption so far is not that swift is working improperly, but rather that the calling context is somehow misconfigured.

PostPosted: Thu Nov 04, 2010 2:30 pm
Hi there,

Thanks for your reply.
I don't quite get what you are aiming at, but here are the exact swift calls which work/don't work:

not working:
#:~/applications/swift5/bin$ ./swift "Cepstral: We Build Voices."
Error: Could not speak text: Invalid parameter.

#:~/applications/swift5/bin$ ./swift "Cepstral: We Build Voices." -o test.wav
Error: Could not speak text: Invalid parameter.

#:~/applications/swift5/bin$ ./swift -f test.txt -o test.wav
Error: Could not speak file "test.txt": Invalid parameter.

#:~/applications/swift5/bin$ ./swift --say-all-voices -o test.wav

Voice | Language | Version
Isabelle | Canadian French | 5.1.0
Matthias | German | 5.1.0
David | US English | 5.1.0
--> A wav-file is created which contains the synthesized voice names.

The shell I use when calling the script:
#:~/applications/swift5/bin$ echo $SHELL

As said before, I assume that the problem is the parameter transfer of the text to be synthesized to the swift script.

Do you need any further information for investigating the problem?
Thanks in advance and best regards ...

PostPosted: Fri Dec 03, 2010 5:57 pm
Hey there,

Have you already found out anything regarding my problem?
Maybe you could tell me when the error message "Error: Could not speak text: Invalid parameter." is being returned?

The application is still not running. :(

Thanks in advance and best regards ....

PostPosted: Mon Dec 06, 2010 6:10 pm
I have been able to generate some debugging output by invoking set -xv.
The following statements were displayed:

# /applications/swift5/bin $ ./swift test

+ SWIFT_HOME=/applications/swift5
+ LD_LIBRARY_PATH=/applications/swift5/lib
+ SWIFT_BIN=/applications/swift5/bin
+ SWIFT_VOXPATH=/applications/swift5/voices

+ export SWIFT_HOME
export SWIFT_BIN
+ export SWIFT_BIN

exec "/applications/swift5/bin/swift.bin" ${1+"$@"}
+ exec /applications/swift5/bin/swift.bin test
Error: Could not speak text: Invalid parameter.

Does that help finding a solution to my problem?
Thanks again and best.

check ./swift/etc/swift.xml

PostPosted: Sat Dec 18, 2010 11:46 pm
by sharamun
I don't know if this will help, but maybe the invalid parameter is in ./swift/etc/swift.xml

for reference, here is what I have:

<?xml version="1.0"?>

<!-- Generated by on 2010-11-28 at 18:01:32 -->

<cepstral_swift version="4.1.5">

/home/sharamun/swift/voices <!-- List of voice directories. They can be
seperated by newlines or colons. -->

/home/sharamun/swift/lib <!-- Path to the swift TTS libraries. -->

/home/sharamun/swift/bin <!-- Path to the 'swift' and
'cepstral-licsrv' binaries. -->

/home/sharamun/swift/etc <!-- Path to swift TTS etc files. -->


You also may want to double check your env vars in .bashrc to make sure they are set correctly. For reference, here are the ones I use:

export SWIFT_HOME=/home/sharamun/swift
export SWIFT_BIN=${SWIFT_HOME}/bin
export PATH=${SWIFT_BIN}:${PATH}
export SWIFT_VOXPATH=${SWIFT_HOME}/voices/Amy
export SWIFT_LIB=${SWIFT_HOME}/lib
export SWIFT_ETC=${SWIFT_HOME}/etc