summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/talkfile.h
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-09-23 13:35:45 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-09-23 13:35:45 +0000
commitacc70ec58d88771673c092711b3b2210a03c14bc (patch)
tree77b6bb7dee0c6b026501fbb7a6f20ea90c270f1b /rbutil/rbutilqt/talkfile.h
parent74154436a5fff8a8dd27115395c83c6d41ebf4e9 (diff)
downloadrockbox-acc70ec58d88771673c092711b3b2210a03c14bc.tar.gz
rockbox-acc70ec58d88771673c092711b3b2210a03c14bc.tar.bz2
rockbox-acc70ec58d88771673c092711b3b2210a03c14bc.zip
rbutil: added support for talkfile creation with the rockbox sapi_voice.vbs script. Also let the configure dialog remember options and paths for different tts and encoders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14828 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/talkfile.h')
-rw-r--r--rbutil/rbutilqt/talkfile.h60
1 files changed, 55 insertions, 5 deletions
diff --git a/rbutil/rbutilqt/talkfile.h b/rbutil/rbutilqt/talkfile.h
index f2119bc447..b2d6aa4483 100644
--- a/rbutil/rbutilqt/talkfile.h
+++ b/rbutil/rbutilqt/talkfile.h
@@ -23,6 +23,29 @@
#include "progressloggerinterface.h"
+class TTSBase : public QObject
+{
+ Q_OBJECT
+public:
+ TTSBase(){}
+ virtual ~TTSBase(){}
+ virtual bool voice(QString text,QString wavfile){return false;}
+ virtual bool start(){return false;}
+ virtual bool stop(){return false;}
+
+ void setTTSexe(QString exe){m_TTSexec=exe;}
+ void setTTsOpts(QString opts) {m_TTSOpts=opts;}
+ void setTTsLanguage(QString language) {m_TTSLanguage = language;}
+ void setTTsTemplate(QString t) { m_TTSTemplate = t; }
+
+protected:
+ QString m_TTSexec;
+ QString m_TTSOpts;
+ QString m_TTSTemplate;
+ QString m_TTSLanguage;
+};
+
+
class TalkFileCreator :public QObject
{
Q_OBJECT
@@ -37,6 +60,7 @@ public:
void setTTsType(QString tts) { m_curTTS = tts; }
void setTTsOpts(QString opts) {m_TTSOpts=opts;}
+ void setTTsLanguage(QString language) {m_TTSLanguage = language;}
void setTTsTemplate(QString t) { m_curTTSTemplate = t; }
void setEncType(QString enc) { m_curEnc = enc; }
@@ -56,19 +80,20 @@ private slots:
void abort();
private:
-
- bool initTTS();
- bool stopTTS();
+ TTSBase* m_tts;
+ //bool initTTS();
+ //bool stopTTS();
bool initEncoder();
-
+
bool encode(QString input,QString output);
- bool voice(QString text,QString wavfile);
+ //bool voice(QString text,QString wavfile);
QString m_dir;
QString m_mountpoint;
QString m_curTTS;
QString m_TTSexec;
QString m_TTSOpts;
+ QString m_TTSLanguage;
QString m_curTTSTemplate;
QString m_curEnc;
@@ -87,4 +112,29 @@ private:
bool m_abort;
};
+class TTSSapi : public TTSBase
+{
+public:
+ TTSSapi() {};
+ virtual bool voice(QString text,QString wavfile);
+ virtual bool start();
+ virtual bool stop();
+
+private:
+ QProcess* voicescript;
+};
+
+class TTSExes : public TTSBase
+{
+public:
+ TTSExes() {};
+ virtual bool voice(QString text,QString wavfile);
+ virtual bool start();
+ virtual bool stop() {return true;}
+
+private:
+
+};
+
#endif
+