Oops.
[Rockbox.git] / rbutil / rbutilqt / talkfile.h
blob20bf1e5a701af87c5a31fe1da4939575e7cdd445
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id: talkfile.h 14027 2007-07-27 17:42:49Z domonoky $
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
21 #ifndef TALKFILE_H
22 #define TALKFILE_H
24 #include "progressloggerinterface.h"
26 class TalkFileCreator :public QObject
28 Q_OBJECT
30 public:
31 TalkFileCreator(QObject* parent=0);
33 bool createTalkFiles(ProgressloggerInterface* logger);
35 void setTTSexe(QString exe){m_TTSexec=exe;}
36 void setEncexe(QString exe){m_EncExec=exe;}
38 void setSupportedTTS(QStringList list) {m_supportedTTS=list;}
39 void setSupportedTTSOptions(QStringList list) {m_supportedTTSOpts=list;}
40 void setSupportedTTSTemplates(QStringList list) {m_supportedTTSTemplates=list;}
42 QStringList getSupportedTTS(){return m_supportedTTS;}
43 void setTTsType(QString tts);
44 QString getTTsOpts(QString ttsname);
45 void setTTsOpts(QString opts) {m_TTSOpts=opts;}
47 void setSupportedEnc(QStringList list) {m_supportedEnc=list;}
48 void setSupportedEncOptions(QStringList list) {m_supportedEncOpts=list;}
49 void setSupportedEncTemplates(QStringList list) {m_supportedEncTemplates=list;}
51 QStringList getSupportedEnc(){return m_supportedEnc;}
52 void setEncType(QString enc);
53 QString getEncOpts(QString encname);
54 void setEncOpts(QString opts) {m_EncOpts=opts;}
56 void setDir(QString dir){m_dir = dir; }
58 void setOverwriteTalk(bool ov) {m_overwriteTalk = ov;}
59 void setOverwriteWav(bool ov) {m_overwriteWav = ov;}
60 void setRemoveWav(bool ov) {m_removeWav = ov;}
61 void setRecursive(bool ov) {m_recursive = ov;}
62 void setStripExtensions(bool ov) {m_stripExtensions = ov;}
64 private slots:
65 void abort();
67 private:
69 bool initTTS();
70 bool stopTTS();
71 bool initEncoder();
73 bool encode(QString input,QString output);
74 bool voice(QString text,QString wavfile);
76 QString m_dir;
78 QString m_curTTS;
79 QString m_TTSexec;
80 QStringList m_supportedTTS;
81 QStringList m_supportedTTSOpts;
82 QStringList m_supportedTTSTemplates;
83 QString m_TTSOpts;
84 QString m_curTTSTemplate;
86 QString m_curEnc;
87 QString m_EncExec;
88 QStringList m_supportedEnc;
89 QStringList m_supportedEncOpts;
90 QStringList m_supportedEncTemplates;
91 QString m_EncOpts;
92 QString m_curEncTemplate;
94 bool m_overwriteTalk;
95 bool m_overwriteWav;
96 bool m_removeWav;
97 bool m_recursive;
98 bool m_stripExtensions;
100 ProgressloggerInterface* m_logger;
102 bool m_abort;
105 #endif