Skip to content

Commit

Permalink
Allow swift to change voice pitch and such with newer tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pmatis committed Sep 18, 2016
1 parent d50b376 commit 7af59b7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/Voice_Text.pm
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,19 @@ sub speak_text {
$speak_pgm_arg .= qq[ -e 'set $parms{volume_reset}'];
}
}
elsif ( $speak_engine =~ /(theta|swift)/i ) {

elsif ( $speak_engine eq 'swift' ) {
#<prosody pitch='X' rate='X'>
my $prosodyparms;
$prosodyparms .= " pitch='$parms{pitch}'" if $parms{pitch};
$prosodyparms .= " rate='$parms{rate}'" if $parms{rate};
$prosodyparms .= " volume='$parms{ttsvolume}'" if $parms{ttsvolume};
$parms{text} = '<prosody' . $prosodyparms . '>' . $parms{text} . '</prosody>' if $prosodyparms;

$speak_pgm_arg .= ' -n ' . "'$parms{voice}'" if $parms{voice};
$speak_pgm_arg .= ' -o ' . $parms{to_file} if $parms{to_file}; # Not working yet??
$speak_pgm_arg .= qq[ "$parms{text}"];
}
elsif ( $speak_engine eq 'theta' ) {
$speak_pgm_arg .= " -S $parms{pitch}" if $parms{pitch};
$speak_pgm_arg .= " -r $parms{rate}" if $parms{rate};
if ( $speak_engine eq 'theta' ) {
Expand Down

0 comments on commit 7af59b7

Please sign in to comment.