From 51f1fcbe26c91e1b2b40552827ea582def80d04f Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 26 Apr 2012 20:42:18 +0200 Subject: [PATCH] Voicefile: remove < and > from voice strings before speaking. Some language files have the < and > characters the original string (like "") 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 --- rbutil/rbutilqt/base/voicefile.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rbutil/rbutilqt/base/voicefile.cpp b/rbutil/rbutilqt/base/voicefile.cpp index d5a3586e1b..cb9130c41a 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; } -- 2.11.4.GIT