summaryrefslogtreecommitdiff
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
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
-rwxr-xr-xtools/buildzip.pl5
-rwxr-xr-xtools/voice.pl12
2 files changed, 10 insertions, 7 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index 59c32d3e3d..65aca59e13 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -388,9 +388,12 @@ sub buildzip {
388 } 388 }
389 } 389 }
390 390
391 # create the file so the database does not try indexing a folder 391 # create the file so the database indexer skips this folder
392 open(IGNORE, ">$temp_dir/database.ignore") || die "can't open database.ignore"; 392 open(IGNORE, ">$temp_dir/database.ignore") || die "can't open database.ignore";
393 close(IGNORE); 393 close(IGNORE);
394 # create the file so the talkclip generation skips this folder
395 open(IGNORE, ">$temp_dir/talkclips.ignore") || die "can't open talkclips.ignore";
396 close(IGNORE);
394 397
395 # the samsung ypr0 has a loader script that's needed in the zip 398 # the samsung ypr0 has a loader script that's needed in the zip
396 if ($modelname =~ /samsungypr[01]/) { 399 if ($modelname =~ /samsungypr[01]/) {
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 }