#!/bin/sh
# Start/stop/restart Festival Speech Synthesis System
# By Andrea Sciucca (gohanz at infinito.it)


# Start Festival Server
festival_start() {
  if [ -x /usr/bin/festival_server ]; then
    echo -e "\E[0;32mStarting Festival Server\E[0;0m"
    /usr/bin/festival_server 
  fi
}

# Stop Festival Server
festival_stop() {
  /usr/bin/festival_server_control stop
}

# Restart Festival Server
festival_restart() {
  /usr/bin/festival_server_control restart
}

case "$1" in
'start')
  festival_start
  ;;
'stop')
  festival_stop
  ;;
'restart')
  festival_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac
