Skip to content

Commit

Permalink
0.20190517: Return to RHVoice-test
Browse files Browse the repository at this point in the history
  • Loading branch information
zvezdochiot committed May 18, 2019
1 parent 02c344a commit 8a044ee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.20190517

Return to RHVoice-test

0.20180706

Full depends
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.20180706
0.20190517
12 changes: 6 additions & 6 deletions rhvoiceplay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#Depends: dash, sed, gzip | zutils, rhvoice, aplay | sox

sname="RHVoicePlay"
sversion="0.20180706"
sversion="0.20190517"

echo "$sname $sversion" >&2

Expand All @@ -13,7 +13,7 @@ tcomp="sed"
tcomp="zcat"
[ ! "$(command -v $tcomp)" ] && tnocomp="$tnocomp $tcomp"
tcomp="RHVoice"
tcompa="RHVoice-client"
tcompa="RHVoice-test"
[ ! "$(command -v $tcomp)" -a ! "$(command -v $tcompa)" ] && tnocomp="$tnocomp $tcomp|$tcompa"
tcomp="aplay"
tcompa="play"
Expand Down Expand Up @@ -57,7 +57,7 @@ then
fi

trhvoice="RHVoice"
[ ! "$(command -v $trhvoice)" ] && trhvoice="RHVoice-client -s $tspeaker"
[ ! "$(command -v $trhvoice)" ] && trhvoice="RHVoice-test -p $tspeaker"
tplay="aplay"
[ ! "$(command -v $tplay)" ] && tplay="play -q"

Expand All @@ -67,11 +67,11 @@ then
echo "$text: $textsize" >&2
tln=$(($tln*$textsize/100))
i=$tln
zcat "$text" | sed -e 's/[\.\?\!\…] /&\n/g' | sed -e '/^$/d' | sed -e "1,${tln}d" | while read tline; do p=$((10000*$i/$textsize)); p1=$(($p/100)); p2=$(($p-$p1*100)); printf "%02d.%02d: " $p1 $p2; echo "$tline"; echo "$tline" | $trhvoice | $tplay - 2>/dev/null; i=$(($i+1)); done
zcat "$text" | sed -e 's/[\.\?\!\…] /&\n/g' | sed -e '/^$/d' | sed -e "1,${tln}d" | while read tline; do p=$((10000*$i/$textsize)); p1=$(($p/100)); p2=$(($p-$p1*100)); printf "%02d.%02d: " $p1 $p2; echo "$tline"; echo "$tline" | $trhvoice 2>/dev/null | $tplay - 2>/dev/null; i=$(($i+1)); done
elif [ "x$text" = "x-" ]
then
while read tline; do printf ": "; echo "$tline"; echo "$tline" | $trhvoice | $tplay - 2>/dev/null; done
while read tline; do printf ": "; echo "$tline"; echo "$tline" | $trhvoice 2>/dev/null | $tplay - 2>/dev/null; done
else
echo "$text"
echo "$text" | $trhvoice | $tplay - 2>/dev/null
echo "$text" | $trhvoice 2>/dev/null | $tplay - 2>/dev/null
fi

0 comments on commit 8a044ee

Please sign in to comment.