summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/ttscarbon.h
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/ttscarbon.h')
-rw-r--r--rbutil/rbutilqt/base/ttscarbon.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/ttscarbon.h b/rbutil/rbutilqt/base/ttscarbon.h
new file mode 100644
index 0000000000..c6b4a61320
--- /dev/null
+++ b/rbutil/rbutilqt/base/ttscarbon.h
@@ -0,0 +1,72 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2010 by Dominik Riebeling
10 * $Id$
11 *
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.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef TTSCARBON_H
21#define TTSCARBON_H
22
23#include <QtCore>
24#include "ttsbase.h"
25
26#include <Carbon/Carbon.h>
27#include <inttypes.h>
28
29class TTSCarbon : public TTSBase
30{
31 Q_OBJECT
32 //! Enum to identify the settings
33 enum ConfigValuesCarbon
34 {
35 ConfigVoice
36 };
37 public:
38 TTSCarbon(QObject *parent = NULL);
39
40 //! Child class should generate a clip
41 TTSStatus voice(QString text,QString wavfile, QString* errStr);
42 //! Child class should do startup
43 bool start(QString *errStr);
44 //! child class should stop
45 bool stop() ;
46
47 // configuration
48 //! Child class should return true, when configuration is good
49 bool configOk();
50 //! Child class should generate and insertSetting(..) its settings
51 void generateSettings();
52 //! Chlid class should commit the Settings to permanent storage
53 void saveSettings();
54
55 private:
56 SpeechChannel m_channel;
57 CFStringBuiltInEncodings m_voiceScript;
58
59 unsigned long be2u32(unsigned char* buf);
60 unsigned long be2u16(unsigned char* buf);
61 unsigned char* u32tobuf(unsigned char* buf, uint32_t val);
62 unsigned char* u16tobuf(unsigned char* buf, uint16_t val);
63 unsigned int extended2int(unsigned char* buf);
64 int convertAiffToWav(const char* aiff, const char* wav);
65
66
67 protected:
68 // static QMap<QString,QString> ttsList;
69};
70
71#endif // TTSCARBON_H
72