Hello everyone,

I am presently working on speech synthesis/speech to text on Ubuntu 10.04. So far I've been using festival but I discovered espeak which is also cool by reading other people's previous questions and answers. My main goal is to develop a communication system whereby festival or espeak can speak to the end user and also can be paused/temporarily stopped if given a command from the user. I know that while using the interactive section of festival, one can pause using ctrl+z but I want another means to pause festival from my python code. I'll give a brief example:

--from my code festival is given a file to read:- less example.txt | festival --tts
(so it starts reading the file)

--then from my code, I want to give a command that will pause festival...

--thereafter, from my code, I want to continue running festival from where it stopped reading.

Please anyone who has a clue to this will make my day.

Thanks in advance!

You would have to use threading or multiprocessing. One thread/process would run festival, while another process would capture some input and send a notice (change a variable) in the first process. Obviously you would have to communicate between the two processes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.