#include <stdio.h> 
#include <stdlib.h>
#include <unistd.h>

int main()
{

	char word[80];
	char command1[]="echo ";
	char command2[]="|festival --tts";
	char command[100];

	printf("\nWelcome to speak shell! To quit press q.\n\n");
	while(1)
	{
		int i;
		for (i=0;i<100;i++);
			command[i]=0x00;
		printf("enter word> ");
		scanf("%s", &word);
		strcpy(command, command1);
		strcat(command, word);
		strcat(command, command2);
		if (strcmp(word, "q")==0)
			exit(0);
		system(command);
	}
}
