summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-04-26 20:42:18 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-04-26 21:19:56 +0200
commit51f1fcbe26c91e1b2b40552827ea582def80d04f (patch)
tree8fecf90c21fd6a61fbaf51aae756a1f2cb129087
parentab01d5d8c29fb7f7163245a096e98e57bfe3e445 (diff)
downloadrockbox-51f1fcbe26c91e1b2b40552827ea582def80d04f.zip
rockbox-51f1fcbe26c91e1b2b40552827ea582def80d04f.tar.gz
rockbox-51f1fcbe26c91e1b2b40552827ea582def80d04f.tar.bz2
rockbox-51f1fcbe26c91e1b2b40552827ea582def80d04f.tar.xz
Voicefile: remove < and > from voice strings before speaking.
Some language files have the < and > characters the original string (like "<All tracks>") has included in the voice strings. These characters cause the generated wave file to not contain any samples with SAPI, causing an error when Rockbox Utility tries to encode the file. Since those characters don't make much sense in the voice string remove them prior to speaking. Currently affected languages are basque, chinese-simp, and russian, for which this fixes voicefile creation. Change-Id: Iac7ccd7921ccfb5ddc33645239a1f8f7e639e5aa
-rw-r--r--rbutil/rbutilqt/base/voicefile.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/voicefile.cpp b/rbutil/rbutilqt/base/voicefile.cpp
index d5a3586..cb9130c 100644
--- a/rbutil/rbutilqt/base/voicefile.cpp
+++ b/rbutil/rbutilqt/base/voicefile.cpp
@@ -143,6 +143,7 @@ void VoiceFileCreator::downloadDone(bool error)
else if(line.contains("voice:")) // voice found
{
voice = line.remove("voice:").remove('"').trimmed();
+ voice = voice.remove("<").remove(">");
voicefound=true;
}