mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Talkfile: show folder to talk.
Currently it's not possible to pass multiple folders for talking. Show the folder to talk to give a useful feedback when calling it multiple times. Change-Id: I0f3d1014ee3867cc81122e485fc36353ec0f55ff
This commit is contained in:
parent
0850c1cba2
commit
da08e5059a
1 changed files with 29 additions and 21 deletions
|
|
@ -32,7 +32,8 @@ bool TalkFileCreator::createTalkFiles()
|
|||
m_abort = false;
|
||||
QString errStr;
|
||||
|
||||
emit logItem(tr("Starting Talk file generation"),LOGINFO);
|
||||
emit logItem(tr("Starting Talk file generation for folder %1")
|
||||
.arg(m_dir.dirName()), LOGINFO);
|
||||
emit logProgress(0,0);
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
|
|
@ -150,15 +151,18 @@ bool TalkFileCreator::createTalkList(QDir startDir)
|
|||
//generate entry
|
||||
TalkGenerator::TalkEntry entry;
|
||||
entry.toSpeak = dir.dirName();
|
||||
entry.wavfilename = QDir::tempPath()+ "/talkfiles/" + QCryptographicHash::hash(entry.toSpeak.toUtf8(),
|
||||
QCryptographicHash::Md5).toHex() + ".wav";
|
||||
entry.talkfilename = QDir::tempPath()+ "/talkfiles/" + QCryptographicHash::hash(entry.toSpeak.toUtf8(),
|
||||
QCryptographicHash::Md5).toHex() + ".talk";
|
||||
entry.wavfilename = QDir::tempPath() + "/talkfiles/"
|
||||
+ QCryptographicHash::hash(entry.toSpeak.toUtf8(),
|
||||
QCryptographicHash::Md5).toHex() + ".wav";
|
||||
entry.talkfilename = QDir::tempPath() + "/talkfiles/"
|
||||
+ QCryptographicHash::hash(entry.toSpeak.toUtf8(),
|
||||
QCryptographicHash::Md5).toHex() + ".talk";
|
||||
entry.target = dir.path() + "/_dirname.talk";
|
||||
entry.voiced = false;
|
||||
entry.encoded = false;
|
||||
qDebug() << "toSpeak: " << entry.toSpeak << " target: " << entry.target << " intermediates: " <<
|
||||
entry.wavfilename << entry.talkfilename;
|
||||
qDebug() << "toSpeak:" << entry.toSpeak
|
||||
<< "target:" << entry.target
|
||||
<< "intermediates:" << entry.wavfilename << entry.talkfilename;
|
||||
m_talkList.append(entry);
|
||||
}
|
||||
}
|
||||
|
|
@ -191,14 +195,18 @@ bool TalkFileCreator::createTalkList(QDir startDir)
|
|||
entry.toSpeak = stripExtension(fileInf.fileName());
|
||||
else
|
||||
entry.toSpeak = fileInf.fileName();
|
||||
entry.wavfilename = QDir::tempPath()+ "/talkfiles/" + QCryptographicHash::hash(entry.toSpeak.toUtf8(),
|
||||
QCryptographicHash::Md5).toHex() + ".wav";
|
||||
entry.talkfilename = QDir::tempPath()+ "/talkfiles/" + QCryptographicHash::hash(entry.toSpeak.toUtf8(),
|
||||
QCryptographicHash::Md5).toHex() + ".talk";
|
||||
entry.wavfilename = QDir::tempPath() + "/talkfiles/"
|
||||
+ QCryptographicHash::hash(entry.toSpeak.toUtf8(),
|
||||
QCryptographicHash::Md5).toHex() + ".wav";
|
||||
entry.talkfilename = QDir::tempPath() + "/talkfiles/"
|
||||
+ QCryptographicHash::hash(entry.toSpeak.toUtf8(),
|
||||
QCryptographicHash::Md5).toHex() + ".talk";
|
||||
entry.target = fileInf.path() + "/" + fileInf.fileName() + ".talk";
|
||||
entry.voiced = false;
|
||||
entry.encoded = false;
|
||||
qDebug() << "toSpeak: " << entry.toSpeak << " target: " << entry.target << " intermediates: " <<
|
||||
qDebug() << "toSpeak:" << entry.toSpeak
|
||||
<< "target:" << entry.target
|
||||
<< "intermediates:" <<
|
||||
entry.wavfilename << entry.talkfilename;
|
||||
m_talkList.append(entry);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue