1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Wenger
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.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
22 #include "ttsfestival.h"
26 // list of tts names and identifiers
27 QMap
<QString
,QString
> TTSBase::ttsList
;
29 TTSBase::TTSBase(QObject
* parent
): EncTtsSettingInterface(parent
)
35 void TTSBase::initTTSList()
37 ttsList
["espeak"] = "Espeak TTS Engine";
38 ttsList
["flite"] = "Flite TTS Engine";
39 ttsList
["swift"] = "Swift TTS Engine";
41 ttsList
["sapi"] = "Sapi TTS Engine";
43 #if defined(Q_OS_LINUX)
44 ttsList
["festival"] = "Festival TTS Engine";
48 // function to get a specific encoder
49 TTSBase
* TTSBase::getTTS(QObject
* parent
,QString ttsName
)
56 tts
= new TTSSapi(parent
);
61 #if defined(Q_OS_LINUX)
62 if (ttsName
== "festival")
64 tts
= new TTSFestival(parent
);
69 if (true) // fix for OS other than WIN or LINUX
71 tts
= new TTSExes(ttsName
,parent
);
76 // get the list of encoders, nice names
77 QStringList
TTSBase::getTTSList()
79 // init list if its empty
80 if(ttsList
.count() == 0)
83 return ttsList
.keys();
86 // get nice name of a specific tts
87 QString
TTSBase::getTTSName(QString tts
)
91 return ttsList
.value(tts
);