summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/ttsfestival.h
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/ttsfestival.h')
-rw-r--r--rbutil/rbutilqt/base/ttsfestival.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/ttsfestival.h b/rbutil/rbutilqt/base/ttsfestival.h
new file mode 100644
index 0000000000..9d644c1857
--- /dev/null
+++ b/rbutil/rbutilqt/base/ttsfestival.h
@@ -0,0 +1,67 @@
1/***************************************************************************
2* __________ __ ___.
3* Open \______ \ ____ ____ | | _\_ |__ _______ ___
4* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7* \/ \/ \/ \/ \/
8*
9* Copyright (C) 2009 by Dominik Wenger
10* $Id$
11*
12* This program is free software; you can redistribute it and/or
13* modify it under the terms of the GNU General Public License
14* as published by the Free Software Foundation; either version 2
15* of the License, or (at your option) any later version.
16*
17* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18* KIND, either express or implied.
19*
20****************************************************************************/
21
22#ifndef TTSFESTIVAL_H
23#define TTSFESTIVAL_H
24
25#include "ttsbase.h"
26
27class TTSFestival : public TTSBase
28{
29 enum ESettings
30 {
31 eSERVERPATH,
32 eCLIENTPATH,
33 eVOICE,
34 eVOICEDESC
35 };
36
37 Q_OBJECT
38public:
39 TTSFestival(QObject* parent=NULL) :TTSBase(parent) {}
40 ~TTSFestival();
41 bool start(QString *errStr);
42 bool stop();
43 TTSStatus voice(QString text,QString wavfile, QString *errStr);
44
45 // for settings
46 bool configOk();
47 void generateSettings();
48 void saveSettings();
49
50private slots:
51 void updateVoiceList();
52 void updateVoiceDescription();
53 void clearVoiceDescription();
54private:
55 QStringList getVoiceList(QString path ="");
56 QString getVoiceInfo(QString voice,QString path ="");
57
58 inline void startServer(QString path="");
59 inline void ensureServerRunning(QString path="");
60 QString queryServer(QString query, int timeout = -1,QString path="");
61 QProcess serverProcess;
62 QStringList voices;
63 QMap<QString, QString> voiceDescriptions;
64};
65
66
67#endif