summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/ttsbase.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-02-28 20:19:54 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-02-28 20:19:54 +0000
commit495edfb7b95994ed44a5ebb4ef1fca716d1254d4 (patch)
tree795cc85d9979a3545b270c747c19601d84ac3b3d /rbutil/rbutilqt/base/ttsbase.cpp
parentc1689ca80d3f43ca079062864fe0d9c2c32ff99b (diff)
downloadrockbox-495edfb7b95994ed44a5ebb4ef1fca716d1254d4.tar.gz
rockbox-495edfb7b95994ed44a5ebb4ef1fca716d1254d4.tar.bz2
rockbox-495edfb7b95994ed44a5ebb4ef1fca716d1254d4.zip
Add support for OS X' Speech Synthesis Manager TTS system.
This adds basic support for using the OS X' TTS system. The current implementation does only support selecting the voice itself, no further settings (like speed pitch / speed) adjustments are implemented. As OS X' TTS system wants the strings to get spoken in 8 bit encoding problems with locale combinations are possible. For this better error handling in the rbutil TTS is needed. The voice test button in the configuration dialog reacts pretty slow due to the way its speaking is done. This can get changed but also requires adjustments in the rbutil TTS system. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24979 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/ttsbase.cpp')
-rw-r--r--rbutil/rbutilqt/base/ttsbase.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/ttsbase.cpp b/rbutil/rbutilqt/base/ttsbase.cpp
index 1f4060fc72..d68c1816ab 100644
--- a/rbutil/rbutilqt/base/ttsbase.cpp
+++ b/rbutil/rbutilqt/base/ttsbase.cpp
@@ -22,6 +22,9 @@
#include "ttsfestival.h"
#include "ttssapi.h"
#include "ttsexes.h"
+#if defined(Q_OS_MACX)
+#include "ttscarbon.h"
+#endif
// list of tts names and identifiers
QMap<QString,QString> TTSBase::ttsList;
@@ -43,6 +46,9 @@ void TTSBase::initTTSList()
#if defined(Q_OS_LINUX)
ttsList["festival"] = "Festival TTS Engine";
#endif
+#if defined(Q_OS_MACX)
+ ttsList["carbon"] = "OS X System Engine";
+#endif
}
// function to get a specific encoder
@@ -66,6 +72,14 @@ TTSBase* TTSBase::getTTS(QObject* parent,QString ttsName)
}
else
#endif
+#if defined(Q_OS_MACX)
+ if(ttsName == "carbon")
+ {
+ tts = new TTSCarbon(parent);
+ return tts;
+ }
+ else
+#endif
if (true) // fix for OS other than WIN or LINUX
{
tts = new TTSExes(ttsName,parent);