diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-10-06 13:44:39 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-10-06 13:53:09 +0200 |
commit | 2c3b8bd1e2887b8c5c825fa42cced6f8490493b5 (patch) | |
tree | 151bbca70fac0f0e90b99f436a60a422f0903091 /rbutil/rbutilqt/base/ttsflite.h | |
parent | 7f76bb48b352984c4de8f40509618763e39f181f (diff) | |
download | rockbox-2c3b8bd1e2887b8c5c825fa42cced6f8490493b5.tar.gz rockbox-2c3b8bd1e2887b8c5c825fa42cced6f8490493b5.zip |
Factor out executable based TTS engines to separate subclasses.
Similar as done with SAPI / MSSP make the current implementation for executable
based TTS engines a base class and create derived classes for each supported
TTS. Removes the need for the implementation to know about the individual TTS
engines.
Add support for speaking directly (i.e. without going through a temporary wave
file, currently only used by espeak).
Change-Id: I59bbbd6ee4c2c009b2a8d8e0ab4a9b39ea723d6e
Diffstat (limited to 'rbutil/rbutilqt/base/ttsflite.h')
-rw-r--r-- | rbutil/rbutilqt/base/ttsflite.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/ttsflite.h b/rbutil/rbutilqt/base/ttsflite.h new file mode 100644 index 0000000000..1d9021108e --- /dev/null +++ b/rbutil/rbutilqt/base/ttsflite.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2012 by Dominik Riebeling | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | |||
21 | #ifndef TTSFLITE_H | ||
22 | #define TTSFLITE_H | ||
23 | |||
24 | #include <QtCore> | ||
25 | #include "ttsexes.h" | ||
26 | |||
27 | class TTSFlite : public TTSExes | ||
28 | { | ||
29 | Q_OBJECT | ||
30 | public: | ||
31 | TTSFlite(QObject* parent=NULL) : TTSExes(parent) | ||
32 | { | ||
33 | m_name = "flite"; | ||
34 | |||
35 | /* default to espeak */ | ||
36 | m_TTSTemplate = "\"%exe\" %options -o \"%wavfile\" -t \"%text\""; | ||
37 | m_TTSSpeakTemplate = ""; | ||
38 | m_capabilities = TTSBase::None; | ||
39 | |||
40 | } | ||
41 | }; | ||
42 | |||
43 | #endif | ||