On Sat, Mar 31, 2012 at 12:40:00AM +0530, S Krish wrote:
I am preffering currently to use Festival ( on linux) through OSProcess. Simple to push out sentences one by one..
wholeText splitToSentences do: [ :eaSentence |
OSProcess command: 'echo "', eaSentence , '" | festival --tts'. ].
You can also do something like this if you want to continue sending commands to a single running festival program: festival := PipeableOSProcess command: '/usr/bin/festival'. festival nextPutAll: '(voice_rab_diphone)'. { 'Hello world this is festival' . 'The festival process is still running so you can continue to send ', 'commands to it without starting a new instance each time' . 'When you are done using this process, you can close its input and ', 'allow it to exit normally'. 'Then do a close pipes to close the standard output so you will not ', 'leak file handles due to open pipes' . 'Standard output is left open on purpose to allow you to read output after ', 'the external process has exited' . 'That is the reason that you must close it explicitly after you are done ', 'using the external process' . 'Have fun!' } do: [:sentence | festival nextPutAll: '(SayText "', sentence, ' ")']. festival close. festival closePipes. Dave