From 980124ec7348219962ff17ad0d37c4033d552ace Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 12 Jul 2020 16:50:53 -0400 Subject: voice: Ensure there are no missing strings when generating the voicelist. If the translation is not 100% complete, we need to make sure anything missing is copied from English so there won't be any gaps in the voice files. (This behavior is similar to what we do for the regular binary lang files) Change-Id: I5fd2a50d08317eb8445926145a74a38033e0ebcc --- tools/voice.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/voice.pl b/tools/voice.pl index b05ae86f3e..8e603308f3 100755 --- a/tools/voice.pl +++ b/tools/voice.pl @@ -334,12 +334,16 @@ sub generateclips { my $correctionsfile = dirname($0) . '/voice-corrections.txt'; my $id = ''; my $voice = ''; - my $cmd = "genlang -o -t=$target -e=$english $langfile 2>/dev/null"; + my $cmd = "genlang -o -t=$target -e=$english $language-update.lang 2>/dev/null"; my $pool_file; open(VOICEFONTIDS, "> voicefontids"); my $i = 0; local $| = 1; # make progress indicator work reliably + # First run the language through an update pass so any missing strings + # are backfilled from English. Without this, BADNESS. + system("genlang -u -e=$english $langfile > $language-update.lang"); + my $tts_object = init_tts($tts_engine, $tts_engine_opts, $language); # add string corrections to tts_object. my @corrects = (); -- cgit v1.2.3