diff --git a/tools/voice.pl b/tools/voice.pl index 1180565b64..e19aef131d 100755 --- a/tools/voice.pl +++ b/tools/voice.pl @@ -583,7 +583,7 @@ sub panic_cleanup { # Generate .talk clips sub gentalkclips { our $verbose; - my ($dir, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i) = @_; + my ($dir, $tts_object, $language, $encoder, $encoder_opts, $tts_engine_opts, $i) = @_; my $d = new DirHandle $dir; while (my $file = $d->read) { $file = Encode::decode( locale_fs => $file); @@ -620,6 +620,9 @@ sub gentalkclips { $voice =~ s/\.[^\.]*$//; # Trim extension } + # Apply corrections + $voice = correct_string($voice, $language, $tts_object); + printf("Talkclip %s: %s", $enc, $voice) if $verbose; # Don't generate encoded file if it already exists next if (-f $enc && !$force); @@ -691,7 +694,7 @@ if ($V == 1) { deleteencs(); } elsif ($C) { printf("Generating .talk clips\n Path: %s\n Language: %s\n Encoder (options): %s (%s)\n TTS Engine (options): %s (%s)\n", $ARGV[0], $l, $e, $E, $s, $S); - gentalkclips($ARGV[0], $tts_object, $e, $E, $S, 0); + gentalkclips($ARGV[0], $tts_object, $l, $e, $E, $S, 0); shutdown_tts($tts_object); } else { printusage();