| 123456789101112131415161718192021222324252627 |
- #ifndef SPEECHTHREAD_H
- #define SPEECHTHREAD_H
- #include <QObject>
- #include <QTextToSpeech>
- #include <QTimer>
- class SpeechThread : public QObject
- {
- Q_OBJECT
- public:
- explicit SpeechThread(QObject *parent = nullptr);
- void append(QString speech);
- void start();
- signals:
- public slots:
- void timeout();
- private:
- QStringList SpeechList;
- QTextToSpeech *tts;
- QTimer *timer;
- };
- #endif // SPEECHTHREAD_H
|