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
|
# Generate .talk clips
|
||||||
sub gentalkclips {
|
sub gentalkclips {
|
||||||
our $verbose;
|
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;
|
my $d = new DirHandle $dir;
|
||||||
while (my $file = $d->read) {
|
while (my $file = $d->read) {
|
||||||
$file = Encode::decode( locale_fs => $file);
|
$file = Encode::decode( locale_fs => $file);
|
||||||
|
|
@ -620,6 +620,9 @@ sub gentalkclips {
|
||||||
$voice =~ s/\.[^\.]*$//; # Trim extension
|
$voice =~ s/\.[^\.]*$//; # Trim extension
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Apply corrections
|
||||||
|
$voice = correct_string($voice, $language, $tts_object);
|
||||||
|
|
||||||
printf("Talkclip %s: %s", $enc, $voice) if $verbose;
|
printf("Talkclip %s: %s", $enc, $voice) if $verbose;
|
||||||
# Don't generate encoded file if it already exists
|
# Don't generate encoded file if it already exists
|
||||||
next if (-f $enc && !$force);
|
next if (-f $enc && !$force);
|
||||||
|
|
@ -691,7 +694,7 @@ if ($V == 1) {
|
||||||
deleteencs();
|
deleteencs();
|
||||||
} elsif ($C) {
|
} 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);
|
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);
|
shutdown_tts($tts_object);
|
||||||
} else {
|
} else {
|
||||||
printusage();
|
printusage();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue