MPEGPlayer: Skip to next file when there is a problem with a video file in all-play...
[kugel-rb.git] / rbutil / rbutilqt / base / ttsfestival.h
blob6c64c615323c0e8526e3d1d366c0a44484637385
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2009 by Dominik Wenger
10 * $Id$
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef TTSFESTIVAL_H
23 #define TTSFESTIVAL_H
25 #include <QTemporaryFile>
26 #include "ttsbase.h"
28 class TTSFestival : public TTSBase
30 enum ESettings
32 eSERVERPATH,
33 eCLIENTPATH,
34 eVOICE,
35 eVOICEDESC
38 Q_OBJECT
39 public:
40 TTSFestival(QObject* parent=NULL) : TTSBase(parent) {}
41 ~TTSFestival();
42 bool start(QString *errStr);
43 bool stop();
44 TTSStatus voice(QString text,QString wavfile, QString *errStr);
45 Capabilities capabilities();
47 // for settings
48 bool configOk();
49 void generateSettings();
50 void saveSettings();
52 private slots:
53 void updateVoiceList();
54 void updateVoiceDescription();
55 void clearVoiceDescription();
56 private:
57 QTemporaryFile prologFile;
58 QString prologPath;
59 QString currentPath;
60 QStringList getVoiceList();
61 QString getVoiceInfo(QString voice);
63 inline void startServer();
64 inline bool ensureServerRunning();
65 QString queryServer(QString query, int timeout = -1);
66 QProcess serverProcess;
67 QStringList voices;
68 QMap<QString, QString> voiceDescriptions;
72 #endif