diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-10 20:40:36 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-11 01:33:04 +0000 |
commit | 185d2bbb6a967ad5fb72363677c9b14d1011c949 (patch) | |
tree | 769e3e4294e82711f5a1304ba08ef335e92a6e34 | |
parent | 938d82035530dde86ff607f4fe99194f1efe6c90 (diff) | |
download | rockbox-185d2bbb6a967ad5fb72363677c9b14d1011c949.tar.gz rockbox-185d2bbb6a967ad5fb72363677c9b14d1011c949.zip |
voice: More voice generation fixes:
* espeak vs espeak-ng (prefer the latter!)
* voicepool was busted for most non-english strings
Change-Id: Iae6df0f5426155b7b1f444160814ff9ef4581f21
-rwxr-xr-x | tools/configure | 4 | ||||
-rwxr-xr-x | tools/voice.pl | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tools/configure b/tools/configure index 9069c84e3b..aab3e59dfb 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -1283,6 +1283,10 @@ voiceconfig () { | |||
1283 | advopts="$advopts --voice=$CHOICE" | 1283 | advopts="$advopts --voice=$CHOICE" |
1284 | echo "Mimic voice set to $TTS_MIMIC_VOICE" | 1284 | echo "Mimic voice set to $TTS_MIMIC_VOICE" |
1285 | TTS_OPTS="$TTS_OPTS -voice $TTS_MIMIC_VOICE" | 1285 | TTS_OPTS="$TTS_OPTS -voice $TTS_MIMIC_VOICE" |
1286 | elif [ "$TTS_ENGINE" = "espeak" ] ; then | ||
1287 | if [ -n "`findtool espeak-ng`" ] ; then | ||
1288 | TTS_ENGINE="espeak-ng" | ||
1289 | fi | ||
1286 | fi | 1290 | fi |
1287 | 1291 | ||
1288 | # Read custom tts options from command line | 1292 | # Read custom tts options from command line |
diff --git a/tools/voice.pl b/tools/voice.pl index bc076d5386..05ced3a6d9 100755 --- a/tools/voice.pl +++ b/tools/voice.pl | |||
@@ -26,6 +26,7 @@ use Digest::MD5 qw(md5_hex); | |||
26 | use DirHandle; | 26 | use DirHandle; |
27 | use open ':encoding(utf8)'; | 27 | use open ':encoding(utf8)'; |
28 | use open ':std'; | 28 | use open ':std'; |
29 | use utf8; | ||
29 | 30 | ||
30 | sub printusage { | 31 | sub printusage { |
31 | print <<USAGE | 32 | print <<USAGE |
@@ -383,7 +384,7 @@ sub generateclips { | |||
383 | # If we have a pool of snippets, see if the string exists there first | 384 | # If we have a pool of snippets, see if the string exists there first |
384 | if (defined($ENV{'POOL'})) { | 385 | if (defined($ENV{'POOL'})) { |
385 | $pool_file = sprintf("%s/%s-%s.mp3", $ENV{'POOL'}, | 386 | $pool_file = sprintf("%s/%s-%s.mp3", $ENV{'POOL'}, |
386 | md5_hex("$voice $tts_engine $tts_engine_opts $encoder_opts"), | 387 | md5_hex(Encode::encode_utf8("$voice $tts_engine $tts_engine_opts $encoder_opts")), |
387 | $language); | 388 | $language); |
388 | if (-f $pool_file) { | 389 | if (-f $pool_file) { |
389 | printf("Re-using %s (%s) from pool\n", $id, $voice) if $verbose; | 390 | printf("Re-using %s (%s) from pool\n", $id, $voice) if $verbose; |