forked from len0rd/rockbox
voice: Also apply voice corrections to talkclips
Change-Id: I8846610933dd286d39f930f004787d9a5345a9ce
This commit is contained in:
parent
38211e627d
commit
1694101b23
1 changed files with 5 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue