I myself found the answer. We do not need a callback when lib has completed the conversation process. control moves to the next line only after the completion of the negotiation process.
what i did is:
Thread t = new Thread() {
@Override
public void run() {
super.run();
try {
voice = initializeTTS();
voice.speak("Hello world");
} catch (Exception e) {
e.printStackTrace();
}
}
};
t.start();
mudit source
share