1
0
Fork 0
forked from len0rd/rockbox

voice: Correct a rather embarrasing bug in talk clip generation

Introduced

Change-Id: I150617267b8866a7ae09bf9c01430e7afbd369ed
This commit is contained in:
Solomon Peachy 2025-01-23 15:50:34 -05:00
parent a220402d51
commit 36e85ef78a

View file

@ -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);