forked from len0rd/rockbox
voice: Normalize all voiced strings NFC form before passing them to TTS engine
This should be a no-op for .lang files, but it can matter when generating talk clips, as those are based on the raw filename. Change-Id: Ia449ae7668818e4bf093347fd0fb15fa5b67fa69
This commit is contained in:
parent
d98cad4301
commit
9420650c87
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,7 @@ use DirHandle;
|
|||
use open ':encoding(utf8)';
|
||||
use Encode::Locale;
|
||||
use Encode;
|
||||
use Unicode::Normalize;
|
||||
|
||||
sub printusage {
|
||||
print <<USAGE
|
||||
|
@ -281,6 +282,9 @@ sub voicestring {
|
|||
|
||||
$tts_engine_opts .= $$tts_object{"ttsoptions"};
|
||||
|
||||
# Normalize Unicode
|
||||
$string = NFC($string);
|
||||
|
||||
printf("Generate \"%s\" with %s in file %s\n", $string, $name, $output) if $verbose;
|
||||
if ($name eq 'festival') {
|
||||
# festival_client lies to us, so we have to do awful soul-eating
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue