1 | /*************************************************************************** |
2 | texttospeechsystem.h - description |
3 | ------------------- |
4 | begin : Son Sep 8 2002 |
5 | copyright : (C) 2002 by Gunnar Schmi Dt |
6 | email : kmouth@schmi-dt.de |
7 | ***************************************************************************/ |
8 | |
9 | /*************************************************************************** |
10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * |
15 | * * |
16 | ***************************************************************************/ |
17 | |
18 | #ifndef TEXTTOSPEECHSYSTEM_H |
19 | #define TEXTTOSPEECHSYSTEM_H |
20 | |
21 | #include <QtCore/QList> |
22 | #include <QtCore/QObject> |
23 | |
24 | class KConfig; |
25 | |
26 | /**This class represents a text-to-speech system. |
27 | *@author Gunnar Schmi Dt |
28 | */ |
29 | |
30 | class TextToSpeechSystem : public QObject{ |
31 | Q_OBJECT |
32 | friend class TextToSpeechConfigurationWidget; |
33 | public: |
34 | TextToSpeechSystem(); |
35 | ~TextToSpeechSystem(); |
36 | |
37 | void readOptions (KConfig *config, const QString &langGroup); |
38 | void saveOptions (KConfig *config, const QString &langGroup); |
39 | |
40 | public slots: |
41 | void speak (const QString &text, const QString &language); |
42 | |
43 | private: |
44 | void buildCodecList (); |
45 | |
46 | QList<QTextCodec*> *codecList; |
47 | int codec; |
48 | QString ttsCommand; |
49 | bool stdIn; |
50 | bool useKttsd; |
51 | }; |
52 | |
53 | #endif |
54 | |