1
0
Fork 0
forked from len0rd/rockbox

voice: Encode all tts options in the POOL filename.

It was only including about half.  Unfortunately this will likely
invalidate all existing pools.

Change-Id: Ib1da430259823a5429b4119067ba9ef0c16b7900
This commit is contained in:
Solomon Peachy 2024-07-18 10:29:40 -04:00
parent 16094fca33
commit a7159ad483

View file

@ -479,7 +479,7 @@ sub generateclips {
# If we have a pool of snippets, see if the string exists there first # If we have a pool of snippets, see if the string exists there first
if (defined($ENV{'POOL'})) { if (defined($ENV{'POOL'})) {
$pool_file = sprintf("%s/%s-%s.enc", $ENV{'POOL'}, $pool_file = sprintf("%s/%s-%s.enc", $ENV{'POOL'},
md5_hex(Encode::encode_utf8("$voice ". $tts_object->{"name"}." $tts_engine_opts $encoder_opts")), md5_hex(Encode::encode_utf8("$voice ". $tts_object->{"name"}." $tts_engine_opts ".$tts_object->{"ttsoptions"}." $encoder_opts")),
$language); $language);
if (-f $pool_file) { if (-f $pool_file) {
printf("Re-using %s (%s) from pool\n", $id, $voice) if $verbose; printf("Re-using %s (%s) from pool\n", $id, $voice) if $verbose;
@ -673,7 +673,7 @@ if ($V == 1) {
printf("Generating voice\n Target: %s\n Language: %s\n Encoder (options): %s (%s)\n TTS Engine (options): %s (%s)\n Pool directory: %s\n", printf("Generating voice\n Target: %s\n Language: %s\n Encoder (options): %s (%s)\n TTS Engine (options): %s (%s)\n Pool directory: %s\n",
defined($t) ? $t : "unknown", defined($t) ? $t : "unknown",
$l, $e, $E, $s, $S, defined($ENV{'POOL'}) ? $ENV{'POOL'} : "<none>"); $l, $e, $E, $s, "$S $tts_object->{ttsoptions}", defined($ENV{'POOL'}) ? $ENV{'POOL'} : "<none>");
generateclips($l, $t, $e, $E, $tts_object, $S, $f); generateclips($l, $t, $e, $E, $tts_object, $S, $f);
shutdown_tts($tts_object); shutdown_tts($tts_object);
createvoice($l, $i, $f); createvoice($l, $i, $f);