#!/bin/sh

# This script is called from liquidsoap for generating a file
# for "say:voice/text" URIs.
# Usage: liquidtts text output_file voice

echo $1 | text2wave -scale 1.9 > $2.tmp.wav && sox $2.tmp.wav -c 2 $2
return=$?
rm $2.tmp.wav
exit $return
