|
From: Jonathan D. <jo...@js...> - 2009-12-26 18:40:02
|
On 25 Dec, Soumen banerjee <sou...@gm...> wrote: > Im trying to make a C++ Program using Qt to read text files etc Ive > tried searching extensively, id be delighted if you could furnish me a > basic example on how to use speak_lib.h. espeak.cpp is an example of a small program which uses speak_lib.h to call the libespeak shared library. Do you have a specific question? > In order, i think we should be calling > espeak_Initialize() > espeak_SetSynthCallback() > espeak_Synth() > with the relevant parameters. Yes, that is correct. The probably also want to call: espeak_SetVoiceByName() and perhaps: espeak_SetParameter() Which output mode do you use? If you use AUDIO_OUTPUT_RETRIEVAL or AUDIO_OUTPUT_SYNCHRONOUS then you must call espeak_SetSynthCallback(). This specifies a function in your program which is called with buffers of sound data. Your program is responsible for playing the sound data. If you use AUDIO_OUTPUT_PLAYBACK or AUDIO_OUTPUT_SYNCH_PLAYBACK then libespeak plays the sound data, and you don't need to call espeak_SetSynthCallback(), unless you want to receive word and sentence events. |