Skip to content

Commit

Permalink
0.20180704
Browse files Browse the repository at this point in the history
Simplify version
  • Loading branch information
zvezdochiot committed Jul 4, 2018
1 parent ad7985b commit ce49a04
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 35 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.20180704

Simplify version

0.20180702

Stdin
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ Latest:

* [Git](https://github.com/Olga-Yakovleva/RHVoice)

0.7:

* [rhvoice-0.7.tar.xz](https://sourceforge.net/projects/debiannoofficial/files/src/sound/speak/rhvoice-0.7.tar.xz)
* [rhvoice_0.7-wheezy_i386.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/sound/rhvoice_0.7-wheezy_i386.deb)
* [rhvoice-data_0.7-wheezy_all.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/sound/rhvoice-data_0.7-wheezy_all.deb)
* [librhvoice3_0.7-wheezy_i386.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/libs/librhvoice3_0.7-wheezy_i386.deb)
* [librhvoice-audio1_0.7-wheezy_i386.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/libs/librhvoice-audio1_0.7-wheezy_i386.deb)
* [librhvoice-core1_0.7-wheezy_i386.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/libs/librhvoice-core1_0.7-wheezy_i386.deb)
* [librhvoice-dev_0.7-wheezy_i386.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/libdevel/librhvoice-dev_0.7-wheezy_i386.deb)

0.5:

* [rhvoice-0.5.tar.xz](https://sourceforge.net/projects/debiannoofficial/files/src/sound/speak/rhvoice-0.5.tar.xz)
Expand All @@ -26,14 +36,16 @@ Latest:
* [librhvoice-audio0_0.5-wheezy_i386.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/libs/librhvoice-audio0_0.5-wheezy_i386.deb)
* [librhvoice-core0_0.5-wheezy_i386.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/libs/librhvoice-core0_0.5-wheezy_i386.deb)
* [librhvoice-dev_0.5-wheezy_i386.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/libdevel/librhvoice-dev_0.5-wheezy_i386.deb)
* [license-gpl_3.0-20171206_all.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/doc/license-gpl_3.0-20171206_all.deb)
* [license-lgpl_3.0-20171206_all.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/doc/license-lgpl_3.0-20171206_all.deb)

0.3:

* [rhvoice-0.3.0.tar.xz](https://sourceforge.net/projects/debiannoofficial/files/src/sound/speak/rhvoice-0.3.0.tar.xz)
* [rhvoice_0.3-wheezy_i386.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/sound/rhvoice_0.3-wheezy_i386.deb)

all:

* [license-gpl_3.0-20171206_all.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/doc/license-gpl_3.0-20171206_all.deb)
* [license-lgpl_3.0-20171206_all.deb](https://sourceforge.net/projects/debiannoofficial/files/wheezy-update/doc/license-lgpl_3.0-20171206_all.deb)

---
2018
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.20180702
0.20180704
24 changes: 24 additions & 0 deletions man/man1/rhvoiceplay.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.TH "RHVoicePlay" 0.20180704 "04 Jul 2018" "User documentation"
.SH NAME
rhvoiceplay
.SH DESCRIPTION
SH script book reader of RHVoice speech synthesizer.
.SH SYNOPSIS
rhvoiceplay [options] book.txt|-|string
.SH OPTIONS
.TP
-l N
line begin [N=0-100] (only .txt, default = 0)
.TP
-s str
RHVoice speaker (RHVoice >=0.5, default = aleksandr)
.TP
-h
help
.SH EXAMPLES
rhvoiceplay -s elena book.txt.gz
.SH COPYRIGHT
(c) 2018 zvezdochiot.
All rights reserved.
.SH "SEE ALSO"
speech-dispatcher
55 changes: 23 additions & 32 deletions rhvoiceplay.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@
#Depends: dash, rhvoice, aplay

sname="RHVoicePlay"
sversion="0.20180702"
sversion="0.20180704"

echo "$sname $sversion" >&2

tnocomp=""
tcomp="RHVoice"
tcompa="RHVoice-client"
[ ! "$(command -v $tcomp)" -a ! "$(command -v $tcompa)" ] && tnocomp="$tnocomp $tcomp|$tcompa"
tcomp="aplay"
tcompa="play"
[ ! "$(command -v $tcomp)" -a ! "$(command -v $tcompa)" ] && tnocomp="$tnocomp $tcomp|$tcompa"
if [ "x$tnocomp" != "x" ]
then
echo "Not found:${tnocomp}!" >&2
echo "" >&2
exit 1
fi

tln=0
tspeaker="aleksandr"
fhlp="false"
Expand Down Expand Up @@ -38,45 +52,22 @@ then
exit 0
fi

if [ ! "$(command -v RHVoice)" -a ! "$(command -v RHVoice-client)" ]
then
echo "WARNING! RHVoice not found" >&2
exit 1
fi

if [ ! "$(command -v aplay)" ]
then
echo "WARNING! aplay not found" >&2
exit 1
fi
trhvoice="RHVoice"
[ ! "$(command -v $trhvoice)" ] && trhvoice="RHVoice-client -s $tspeaker"
tplay="aplay"
[ ! "$(command -v $tplay)" ] && tplay="play -q"

if [ -f "$text" ]
then
textsize=$(zcat "$text" | sed -e 's/[\.\?\!\…]/&\n/g' | sed -e '/^$/d' | wc -l)
echo "$text: $textsize" >&2
tln=$(($tln*$textsize/100))
i=$tln
if [ "$(command -v RHVoice)" ]
then
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" | RHVoice | aplay - 2>/dev/null; (( i++ )); done
else
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" | RHVoice-client -s "$tspeaker" | aplay - 2>/dev/null; (( i++ )); done
fi
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
elif [ "x$text" = "x-" ]
then
if [ "$(command -v RHVoice)" ]
then
while read tline; do printf ": "; echo "$tline"; echo "$tline" | RHVoice | aplay - 2>/dev/null; done
else
while read tline; do printf ": "; echo "$tline"; echo "$tline" | RHVoice-client -s "$tspeaker" | aplay - 2>/dev/null; done
fi
while read tline; do printf ": "; echo "$tline"; echo "$tline" | $trhvoice | $tplay - 2>/dev/null; done
else
if [ "$(command -v RHVoice)" ]
then
echo "$text"
echo "$text" | RHVoice | aplay - 2>/dev/null
else
echo "$text"
echo "$text" | RHVoice-client -s "$tspeaker" | aplay - 2>/dev/null
fi
echo "$text"
echo "$text" | $trhvoice | $tplay - 2>/dev/null
fi

0 comments on commit ce49a04

Please sign in to comment.