summaryrefslogtreecommitdiff
path: root/tools/voice.pl
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-05-07 15:16:29 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-05-07 16:21:21 -0400
commit6bb6c20479c81036496501ec98ce1404202c60f6 (patch)
tree26ede94da6b7e8c21d52a57929ef4e35c34e5fbd /tools/voice.pl
parent64e4f81ffc7173bfbbf83bb4485a29ede67a4824 (diff)
downloadrockbox-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-xtools/voice.pl12
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 }