forked from len0rd/rockbox
voice.pl: Fix an issue with the piper tts engine
It only arose with the dailybuild scripts. Change-Id: Iefb0fbab39846df6e52b3860f3d74e6dc9c39305
This commit is contained in:
parent
4c9d346cb2
commit
8f75b29aed
1 changed files with 5 additions and 4 deletions
|
|
@ -178,6 +178,10 @@ sub init_tts {
|
|||
$ret{"ttsoptions"} = "--language $festival_lang_map{$language} ";
|
||||
}
|
||||
} elsif ($tts_engine eq 'piper') {
|
||||
if (defined($piper_lang_map{$language}) && $tts_engine_opts !~ /--model/) {
|
||||
die("Need PIPER_MODEL_DIR\n") if (!defined($ENV{'PIPER_MODEL_DIR'}));
|
||||
$tts_engine_opts = "--model $ENV{PIPER_MODEL_DIR}/$piper_lang_map{$language} ";
|
||||
}
|
||||
my $cmd = "piper $tts_engine_opts --json-input";
|
||||
print("> $cmd\n") if $verbose;
|
||||
|
||||
|
|
@ -188,10 +192,7 @@ sub init_tts {
|
|||
binmode(*CMD_IN, ':encoding(utf8)');
|
||||
binmode(*CMD_OUT, ':encoding(utf8)');
|
||||
binmode(*CMD_ERR, ':encoding(utf8)');
|
||||
if (defined($piper_lang_map{$language}) && $tts_engine_opts !~ /--model/) {
|
||||
die("Need PIPER_MODEL_DIR\n") if (!defined($ENV{'PIPER_MODEL_DIR'}));
|
||||
$ret{"ttsoptions"} = "--model $ENV{PIPER_MODEL_DIR}/$piper_lang_map{$language} ";
|
||||
}
|
||||
|
||||
} elsif ($tts_engine eq 'sapi') {
|
||||
my $toolsdir = dirname($0);
|
||||
my $path = `cygpath $toolsdir -a -w`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue