diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-05-07 15:16:29 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-05-07 16:21:21 -0400 |
commit | 6bb6c20479c81036496501ec98ce1404202c60f6 (patch) | |
tree | 26ede94da6b7e8c21d52a57929ef4e35c34e5fbd /tools/voice.pl | |
parent | 64e4f81ffc7173bfbbf83bb4485a29ede67a4824 (diff) | |
download | rockbox-6bb6c20479c81036496501ec98ce1404202c60f6.tar.gz rockbox-6bb6c20479c81036496501ec98ce1404202c60f6.zip |
voice: Don't generate talkclips for directories with 'talkclip.ignore'
Add one of these to the .rockbox directory
Change-Id: Ibc9733ba31d1b2c49b69ab833d284faa84f5cedd
Diffstat (limited to 'tools/voice.pl')
-rwxr-xr-x | tools/voice.pl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/voice.pl b/tools/voice.pl index 2c966cb0df..9efc844c10 100755 --- a/tools/voice.pl +++ b/tools/voice.pl | |||
@@ -582,13 +582,13 @@ sub gentalkclips { | |||
582 | if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) { | 582 | if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) { |
583 | next; | 583 | next; |
584 | } | 584 | } |
585 | # Element is a dir | 585 | |
586 | if ( -d $path) { | 586 | if ( -d $path) { # Element is a dir |
587 | $enc = sprintf("%s/_dirname.talk", $path); | 587 | $enc = sprintf("%s/_dirname.talk", $path); |
588 | gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i); | 588 | if (! -e "$path/talkclips.ignore") { # Skip directories containing "talkclips.ignore" |
589 | } | 589 | gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i); |
590 | # Element is a file | 590 | } |
591 | else { | 591 | } else { # Element is a file |
592 | $enc = sprintf("%s.talk", $path); | 592 | $enc = sprintf("%s.talk", $path); |
593 | $voice =~ s/\.[^\.]*$//; # Trim extension | 593 | $voice =~ s/\.[^\.]*$//; # Trim extension |
594 | } | 594 | } |