Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

voice: Correct a rather embarrasing bug in talk clip generation

Introduced

Change-Id: I150617267b8866a7ae09bf9c01430e7afbd369ed

+7 -6
+7 -6
tools/voice.pl
··· 592 592 our $verbose; 593 593 my ($dir, $tts_object, $language, $encoder, $encoder_opts, $tts_engine_opts, $i) = @_; 594 594 my $d = new DirHandle $dir; 595 + 595 596 while (my $file = $d->read) { 596 597 $file = Encode::decode( locale_fs => $file); 597 598 my ($voice, $wav, $enc); 598 599 my $format = $tts_object->{'format'}; 600 + 601 + # Ignore dot-dirs and talk files 602 + if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) { 603 + next; 604 + } 599 605 600 606 # Print some progress information 601 607 if (++$i % 10 == 0 and !$verbose) { 602 608 print("."); 603 - } 604 - 605 - # Ignore dot-dirs and talk files 606 - if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) { 607 - next; 608 609 } 609 610 610 611 $voice = $file; ··· 620 621 if ( -d $path) { # Element is a dir 621 622 $enc = sprintf("%s/_dirname.talk", $path); 622 623 if (! -e "$path/talkclips.ignore") { # Skip directories containing "talkclips.ignore" 623 - gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i); 624 + gentalkclips($path, $tts_object, $language, $encoder, $encoder_opts, $tts_engine_opts, $i); 624 625 } 625 626 } else { # Element is a file 626 627 $enc = sprintf("%s.talk", $path);