Skip to content

Commit 02c344a

Browse files
committed
0.20180706
Full depends
1 parent ce49a04 commit 02c344a

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.20180706
2+
3+
Full depends
4+
15
0.20180704
26

37
Simplify version

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.20180704
1+
0.20180706

rhvoiceplay.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/sh
22
#rhvoiceplay.sh
3-
#Depends: dash, rhvoice, aplay
3+
#Depends: dash, sed, gzip | zutils, rhvoice, aplay | sox
44

55
sname="RHVoicePlay"
6-
sversion="0.20180704"
6+
sversion="0.20180706"
77

88
echo "$sname $sversion" >&2
99

1010
tnocomp=""
11+
tcomp="sed"
12+
[ ! "$(command -v $tcomp)" ] && tnocomp="$tnocomp $tcomp"
13+
tcomp="zcat"
14+
[ ! "$(command -v $tcomp)" ] && tnocomp="$tnocomp $tcomp"
1115
tcomp="RHVoice"
1216
tcompa="RHVoice-client"
1317
[ ! "$(command -v $tcomp)" -a ! "$(command -v $tcompa)" ] && tnocomp="$tnocomp $tcomp|$tcompa"
@@ -59,11 +63,11 @@ tplay="aplay"
5963

6064
if [ -f "$text" ]
6165
then
62-
textsize=$(zcat "$text" | sed -e 's/[\.\?\!\…]/&\n/g' | sed -e '/^$/d' | wc -l)
66+
textsize=$(zcat "$text" | sed -e 's/[\.\?\!\…] /&\n/g' | sed -e '/^$/d' | wc -l)
6367
echo "$text: $textsize" >&2
6468
tln=$(($tln*$textsize/100))
6569
i=$tln
66-
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
70+
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
6771
elif [ "x$text" = "x-" ]
6872
then
6973
while read tline; do printf ": "; echo "$tline"; echo "$tline" | $trhvoice | $tplay - 2>/dev/null; done

0 commit comments

Comments
 (0)