forked from len0rd/rockbox
voice: Correct a rather embarrasing bug in talk clip generation
Introduced Change-Id: I150617267b8866a7ae09bf9c01430e7afbd369ed
This commit is contained in:
parent
a220402d51
commit
36e85ef78a
1 changed files with 7 additions and 6 deletions
|
|
@ -592,21 +592,22 @@ sub gentalkclips {
|
|||
our $verbose;
|
||||
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);
|
||||
my ($voice, $wav, $enc);
|
||||
my $format = $tts_object->{'format'};
|
||||
|
||||
# Print some progress information
|
||||
if (++$i % 10 == 0 and !$verbose) {
|
||||
print(".");
|
||||
}
|
||||
|
||||
# Ignore dot-dirs and talk files
|
||||
if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) {
|
||||
next;
|
||||
}
|
||||
|
||||
# Print some progress information
|
||||
if (++$i % 10 == 0 and !$verbose) {
|
||||
print(".");
|
||||
}
|
||||
|
||||
$voice = $file;
|
||||
|
||||
# Convert some symbols to spaces
|
||||
|
|
@ -620,7 +621,7 @@ sub gentalkclips {
|
|||
if ( -d $path) { # Element is a dir
|
||||
$enc = sprintf("%s/_dirname.talk", $path);
|
||||
if (! -e "$path/talkclips.ignore") { # Skip directories containing "talkclips.ignore"
|
||||
gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i);
|
||||
gentalkclips($path, $tts_object, $language, $encoder, $encoder_opts, $tts_engine_opts, $i);
|
||||
}
|
||||
} else { # Element is a file
|
||||
$enc = sprintf("%s.talk", $path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue