This patch fixes the inability of espeak to run from anywhere other than /usr. It also makes it a "no-temp-files" profile.
Code:
diff --git a/pts/test-resources/espeak/install.sh b/pts/test-resources/espeak/install.sh
index cc5e731..0f36a5e 100644
--- a/pts/test-resources/espeak/install.sh
+++ b/pts/test-resources/espeak/install.sh
@@ -1,13 +1,18 @@
#!/bin/sh
cd $1
+THIS_DIR=$(pwd)
unzip -o espeak-1.37-source.zip
cd espeak-1.37-source/src/
+sed -i -e "s|/usr|$THIS_DIR/espeak_|g" Makefile
+sed -i -e "s|/usr|$THIS_DIR/espeak_|g" speech.h
+
make -j $NUM_CPU_JOBS
+make install
cd ../..
+rm -rf espeak-1.37-source/
echo "#!/bin/sh
-cd espeak-1.37-source/src/
-/usr/bin/time -f \"eSpeak Synthesis Time: %e Seconds\" ./espeak -f ../../20417-8.txt -w ../../output.wav 2>&1
-rm -f ../../output.wav" > espeak
+cd espeak_/bin/
+LD_LIBRARY_PATH=$THIS_DIR/espeak_/lib/:\$LD_LIBRARY_PATH /usr/bin/time -f \"eSpeak Synthesis Time: %e Seconds\" ./espeak -f ../../20417-8.txt -w /dev/null 2>&1" > espeak
chmod +x espeak
diff --git a/pts/test-resources/espeak/pre.sh b/pts/test-resources/espeak/pre.sh
deleted file mode 100644
index 7e4b754..0000000
--- a/pts/test-resources/espeak/pre.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-cd $1
-rm -f output.wav