QTextToSpeech plugin threading question
I'm writting a plugin for QTextToSpeech to use another speech engine than the ones available now.
This engine syncronously generates speech audio samples that I need to pass to a QAudioOutput to play it.
I will use the QTextToSpeech api from a Qml UI.
I' wondering if and where I should you threads:
1/ Do I need to put my engine in a dedicated thread ?
2/ Do I need to put the QAudioOutput in a dedicated thread ?
Thanks in advance for your feedback on this.
Does that task takes time/resources ? If so, then I would move the engine handling in its own thread. Doing so, you'll likely have the QAudioOuput in the same thread as the engine.
thx @SGaist, it takes in best case 20-25ms for a small sentence, but can be much more for big ones
Pablo J. Rogina last edited by
// A common base class for text-to-speech engine integrations
// that require audio output implementation and thread handling.
@Pablo-J.-Rogina Oh I totally missed it! I looked at some plugins but not flite implementation that use it, gonna have a look! thanks!