diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-07-20 11:13:27 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-07-20 11:18:22 -0400 |
commit | e0b34a5c4d5d214b03decbd6420d4c0a38700f49 (patch) | |
tree | ea0db5645604961f6dbe9ad9932d90444f3dc25c | |
parent | 6bfcba44226005a5c361594d855ee8d5d958af38 (diff) | |
download | rockbox-e0b34a5c4d5d214b03decbd6420d4c0a38700f49.tar.gz rockbox-e0b34a5c4d5d214b03decbd6420d4c0a38700f49.zip |
FS#13449: Generate standalone voice clips in rbutil
VOICE_INVALID_VOICE_FILE and VOICE_LANG_NAME need to be discretely
saved as "InvalidVoice_<langname>.talk" and "<langname>.lng.talk"
under the target .rockbox/langs directory
This mirrors what the standalone voice.pl and buildzip.pl do.
Change-Id: I70fda4ffe85b5bccc164ebcbb484eedf034f143b
-rw-r--r-- | utils/rbutilqt/base/voicefile.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/rbutilqt/base/voicefile.cpp b/utils/rbutilqt/base/voicefile.cpp index dbdd56e53e..267af18010 100644 --- a/utils/rbutilqt/base/voicefile.cpp +++ b/utils/rbutilqt/base/voicefile.cpp | |||
@@ -247,8 +247,7 @@ void VoiceFileCreator::create(void) | |||
247 | TalkGenerator::TalkEntry entry; | 247 | TalkGenerator::TalkEntry entry; |
248 | entry.toSpeak = voice; | 248 | entry.toSpeak = voice; |
249 | entry.wavfilename = m_path + "/" + id + ".wav"; | 249 | entry.wavfilename = m_path + "/" + id + ".wav"; |
250 | //voicefont wants them with .mp3 extension | 250 | entry.talkfilename = m_path + "/" + id + ".enc"; |
251 | entry.talkfilename = m_path + "/" + id + ".mp3"; | ||
252 | entry.voiced = false; | 251 | entry.voiced = false; |
253 | entry.encoded = false; | 252 | entry.encoded = false; |
254 | if(id == "VOICE_PAUSE") | 253 | if(id == "VOICE_PAUSE") |
@@ -324,6 +323,10 @@ void VoiceFileCreator::create(void) | |||
324 | voicefont(ids2,m_targetid,m_path.toLocal8Bit().data(), output, m_voiceformat); | 323 | voicefont(ids2,m_targetid,m_path.toLocal8Bit().data(), output, m_voiceformat); |
325 | // ids2 and output are closed by voicefont(). | 324 | // ids2 and output are closed by voicefont(). |
326 | 325 | ||
326 | // Copy these two over to the device | ||
327 | QFile::copy(m_path + "/VOICE_INVALID_VOICE_FILE.enc", m_mountpoint + "/.rockbox/langs/InvalidVoice_" + m_lang + ".talk"); | ||
328 | QFile::copy(m_path + "/VOICE_LANG_NAME.enc", m_mountpoint + "/.rockbox/langs/" + m_lang + ".lng.talk"); | ||
329 | |||
327 | //cleanup | 330 | //cleanup |
328 | cleanup(); | 331 | cleanup(); |
329 | 332 | ||
@@ -359,4 +362,3 @@ void VoiceFileCreator::cleanup() | |||
359 | 362 | ||
360 | return; | 363 | return; |
361 | } | 364 | } |
362 | |||