summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/talkfile.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2008-01-19 18:33:33 +0000
committerDominik Wenger <domonoky@googlemail.com>2008-01-19 18:33:33 +0000
commit6b5780dae3561842c858f9c63d00430521628c9c (patch)
tree130cf07117dfa39d29811ddd6d509aa9456de657 /rbutil/rbutilqt/talkfile.cpp
parent2cffb1bf3df30d312944cc283a48c081def2fec8 (diff)
downloadrockbox-6b5780dae3561842c858f9c63d00430521628c9c.tar.gz
rockbox-6b5780dae3561842c858f9c63d00430521628c9c.tar.bz2
rockbox-6b5780dae3561842c858f9c63d00430521628c9c.zip
rbutilqt: made the sapi TTS more configurable, you can now select a specific voice in the config dialog. Also reworked some setSetting functions, to remove depencies.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16111 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/talkfile.cpp')
-rw-r--r--rbutil/rbutilqt/talkfile.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/rbutil/rbutilqt/talkfile.cpp b/rbutil/rbutilqt/talkfile.cpp
index c602716f67..89166daa90 100644
--- a/rbutil/rbutilqt/talkfile.cpp
+++ b/rbutil/rbutilqt/talkfile.cpp
@@ -28,15 +28,17 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
{
m_abort = false;
m_logger = logger;
- m_logger->addItem("Starting Talk file generation",LOGINFO);
+ m_logger->addItem(tr("Starting Talk file generation"),LOGINFO);
//tts
m_tts = getTTS(userSettings->value("tts").toString());
- m_tts->setUserCfg(userSettings);
+ m_tts->setCfg(userSettings,deviceSettings);
- if(!m_tts->start())
+ QString errStr;
+ if(!m_tts->start(&errStr))
{
- m_logger->addItem("Init of TTS engine failed",LOGERROR);
+ m_logger->addItem(errStr,LOGERROR);
+ m_logger->addItem(tr("Init of TTS engine failed"),LOGERROR);
m_logger->abort();
return false;
}
@@ -47,7 +49,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
if(!m_enc->start())
{
- m_logger->addItem("Init of Encoder engine failed",LOGERROR);
+ m_logger->addItem(tr("Init of Encoder engine failed"),LOGERROR);
m_logger->abort();
m_tts->stop();
return false;
@@ -65,7 +67,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
{
if(m_abort)
{
- m_logger->addItem("Talk file creation aborted",LOGERROR);
+ m_logger->addItem(tr("Talk file creation aborted"),LOGERROR);
m_logger->abort();
m_tts->stop();
return false;
@@ -127,10 +129,10 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
{
if(!wavfilenameInf.exists() || m_overwriteWav)
{
- m_logger->addItem("Voicing of " + toSpeak,LOGINFO);
+ m_logger->addItem(tr("Voicing of %1").arg(toSpeak),LOGINFO);
if(!m_tts->voice(toSpeak,wavfilename))
{
- m_logger->addItem("Voicing of " + toSpeak + " failed",LOGERROR);
+ m_logger->addItem(tr("Voicing of %s failed").arg(toSpeak),LOGERROR);
m_logger->abort();
m_tts->stop();
m_enc->stop();
@@ -138,10 +140,10 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
}
QApplication::processEvents();
}
- m_logger->addItem("Encoding of " + toSpeak,LOGINFO);
+ m_logger->addItem(tr("Encoding of %1").arg(toSpeak),LOGINFO);
if(!m_enc->encode(wavfilename,filename))
{
- m_logger->addItem("Encoding of " + wavfilename + " failed",LOGERROR);
+ m_logger->addItem(tr("Encoding of %1 failed").arg(wavfilename),LOGERROR);
m_logger->abort();
m_tts->stop();
m_enc->stop();
@@ -168,7 +170,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
installlog.endGroup();
m_tts->stop();
- m_logger->addItem("Finished creating Talk files",LOGOK);
+ m_logger->addItem(tr("Finished creating Talk files"),LOGOK);
m_logger->setProgressMax(1);
m_logger->setProgressValue(1);
m_logger->abort();