/** This test demonstrate the basic text-to-speech capability of eSpeak
 *
 * Author: Jordan Yuan (2 Oct 2013)
 * Revised by Jerod Weinman (20 Jan 2015)
 */

/* Compile this program with the line
 *  gcc -lMyroC -leSpeakPackage -o eSpeakExample1 eSpeakExample1.c 
 *      or
 *  make eSpeakExample1
 */

#include "eSpeakPackage.h"

int main ()
{
  eSpeakConnect ();//connect to eSpeakSpeak
                   //voice set randomly to female or male
  eSpeakTalk( "setting up testing environment");

  eSpeakTalk( "setting voice to female");
  eSpeakSetGender ("female");

  eSpeakTalk("Once upon a time in a kingdom far far away");

  eSpeakSetGender("male");
  eSpeakTalk("there was a little princess");
  eSpeakTalk("who loves to stare into the stars");

  eSpeakSetGender("female");
  eSpeakTalk("one day a big dragon swooped down and they became the best of friends");

  eSpeakSetGender("male");
  eSpeakTalk("The end");

  eSpeakDisconnect ();//disconnect from eSpeak
} //end of main
