forked from len0rd/rockbox
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
This commit is contained in:
parent
2cffb1bf3d
commit
6b5780dae3
16 changed files with 269 additions and 97 deletions
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
VoiceFileCreator::VoiceFileCreator(QObject* parent) :QObject(parent)
|
||||
{
|
||||
|
||||
m_wavtrimThreshold=500;
|
||||
}
|
||||
|
||||
void VoiceFileCreator::abort()
|
||||
|
|
@ -147,10 +147,12 @@ void VoiceFileCreator::downloadDone(bool error)
|
|||
|
||||
//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(errStr,LOGERROR);
|
||||
m_logger->addItem(tr("Init of TTS engine failed"),LOGERROR);
|
||||
m_logger->abort();
|
||||
return;
|
||||
|
|
@ -249,7 +251,7 @@ void VoiceFileCreator::downloadDone(bool error)
|
|||
// todo strip
|
||||
char buffer[255];
|
||||
|
||||
wavtrim((char*)qPrintable(wavname),500,buffer,255);
|
||||
wavtrim((char*)qPrintable(wavname),m_wavtrimThreshold,buffer,255);
|
||||
|
||||
// encode wav
|
||||
m_enc->encode(wavname,encodedname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue