#include "speechthread.h" //#include SpeechThread::SpeechThread(QObject *parent) : QObject(parent) { SpeechList.clear(); tts = new QTextToSpeech(this); tts->setVolume(1.0); timer = new QTimer(this); connect(timer,&QTimer::timeout,this,&SpeechThread::timeout); } void SpeechThread::append(QString speech) { SpeechList.append(speech); } void SpeechThread::start() { timer->start(1500); } void SpeechThread::timeout() { if(SpeechList.length()>0){ if(tts->state()==QTextToSpeech::Ready){ tts->say(SpeechList.first()); // qDebug()<