accessibility/flite: Updated for version 2.0.0, added docs.

This commit is contained in:
B. Watson 2015-05-10 14:54:34 -04:00 committed by Willy Sudiarto Raharjo
parent 700869b605
commit 7d8d1ac062
7 changed files with 368 additions and 38 deletions

View file

@ -1,3 +1,12 @@
flite (speech synthesis engine)
Flite is a small, fast run-time synthesis engine, designed for
embedded systems and servers. Flite was developed by Alan W Black and
Kevin Lenzo at Carnegie Mellon University, in Pittsburgh.
Starting with version 2.0.0, flite is able to load extra voice files
at runtime, in its own .flitevox format. If you want to include
loadable voices in the package, download the ones you want from
http://festvox.org/flite/packed/flite-2.0/voices/ and place them
in the same directory as the SlackBuild. They will be installed in
/usr/share/flite/, and can be used with the flite's -voice option.

View file

@ -0,0 +1,7 @@
if ! grep "(flite)" usr/info/dir 1>/dev/null 2>/dev/null; then
cat << EOF >> usr/info/dir
Miscellaneous
* FLITE: (flite). Flite, a small, fast speech synthesis engine.
EOF
fi

View file

@ -1,25 +0,0 @@
From dec7aff03916dce6ba4c244314c60cc7b9359585 Mon Sep 17 00:00:00 2001
From: William Hubbs <w.d.hubbs@gmail.com>
Date: Fri, 1 Jan 2010 12:59:59 -0600
Subject: [PATCH] fix parallel builds
---
main/Makefile | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/main/Makefile b/main/Makefile
index 0513e59..e4d04fe 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -81,6 +81,8 @@ else
shared_libs: nothing
endif
+.NOTPARALLEL: $(ALL)
+
$(BINDIR)/flite$(EXEEXT): flite_main.o $(flite_LIBS_deps)
$(TOP)/tools/make_voice_list $(VOICES)
rm -f flite_voice_list.o
--
1.6.4.4

163
accessibility/flite/flite.1 Normal file
View file

@ -0,0 +1,163 @@
.\" Man page generated from reStructuredText.
.
.TH FLITE 1 "2015-05-09" "2.0.0" "SlackBuilds.org"
.SH NAME
flite \- a small simple speech synthesizer
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" RST source for flite(1) man page. Convert with:
.
.\" rst2man.py flite.rst > flite.1
.
.\" rst2man.py comes from the SBo development/docutils package.
.
.SH SYNOPSIS
.sp
flite [\fI\-options\fP] [\fItext/file\fP] [\fIwavefile\fP]
.SH DESCRIPTION
.sp
Converts text in \fItext/file\fP to a waveform in \fIwavefile\fP\&.
.sp
If \fItext/file\fP contains a space, it is treated as a literal
text string and spoken, and not as a file name. If \fItext/file\fP
is omitted or \fB\-\fP, text will be read from standard input.
.sp
If \fIwavefile\fP is unspecified or \fBplay\fP, the result is
played on the current systems audio device. If \fIwavefile\fP
is \fBnone\fP, the waveform is discarded (good for benchmarking).
.sp
Any other options must appear before \fItext/file\fP and/or \fIwavefile\fP\&.
.sp
The full documentation for \fBflite\fP can be read as a GNU
info file with the command \fBinfo flite\fP, or as HTML in
\fI/usr/doc/flite\-|version|/html/index.html\fP\&.
.SH OPTIONS
.\" notice the **-opt** *param* stuff? rst's option recognition
.
.\" can't handle non-GNU-style options like -option (it thinks the
.
.\" option is -o, and the ption is the parameter). So we have to help
.
.\" it out a little.
.
.INDENT 0.0
.TP
.B \-\-version
Output flite version number
.UNINDENT
.INDENT 0.0
.TP
.B \-?, \-h, \-\-help
Output usage string
.UNINDENT
.INDENT 0.0
.TP
.BI \-o \ WAVEFILE
Explicitly set output filename
.TP
.BI \-f \ TEXTFILE
Explicitly set input filename
.TP
.BI \-t \ TEXT
Explicitly set input textstring
.TP
.BI \-p \ PHONES
Explicitly set input textstring and synthesize as phones
.UNINDENT
.INDENT 0.0
.TP
.B \fB\-\-set\fP \fIF=V\fP
Set feature (guesses type)
.TP
.B \fB\-s\fP \fIF=V\fP
Set feature (guesses type)
.TP
.B \fB\-\-seti\fP \fIF=V\fP
Set int feature
.TP
.B \fB\-\-setf\fP \fIF=V\fP
Set float feature
.TP
.B \fB\-\-sets\fP \fIF=V\fP
Set string feature
.UNINDENT
.sp
\fB\-ssml\fP Read input text/file in ssml mode
.INDENT 0.0
.TP
.B \-b
Benchmark mode
.TP
.B \-l
Loop endlessly
.UNINDENT
.INDENT 0.0
.TP
.B \fB\-voice\fP \fINAME\fP
Use voice \fINAME\fP (\fINAME\fP can be filename or url too)
.TP
.B \fB\-voicedir\fP \fINAME\fP
Directory containing voice data
.TP
.B \fB\-lv\fP
List voices available
.TP
.B \fB\-add_lex\fP \fIFILENAME\fP
add lex addenda from \fIFILENAME\fP
.TP
.B \fB\-pw\fP
Print words
.TP
.B \fB\-ps\fP
Print segments
.TP
.B \fB\-psdur\fP
Print segments and their durations (end\-time)
.TP
.B \fB\-pr\fP \fIRelName\fP
Print relation \fIRelName\fP
.TP
.B \fB\-voicedump\fP \fIFILENAME\fP
Dump selected (cg) voice to \fIFILENAME\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-v
Verbose mode
.UNINDENT
.SH SEE ALSO
.sp
The flite homepage: \fI\%http://www.festvox.org/flite/\fP
.SH AUTHOR
Alan W. Black, Kevin Lorenzo
.SH COPYRIGHT
See /usr/doc/flite-2.0.0/COPYING for full copyright information on flite.
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.\" Generated by docutils manpage writer.
.

View file

@ -1,8 +1,15 @@
#!/bin/sh
# Slackware build script for flite
# Written by Martin Lefebvre (dadexter@sekurity.com)
# Maintained by B. Watson (yalhcru@gmail.com), original author is MIA
# Originally written by Martin Lefebvre (dadexter@sekurity.com)
# Now maintained by B. Watson (yalhcru@gmail.com), original author is MIA.
# 20150509 bkw:
# - update for 2.0.0
# - add HTML and .info docs
# - add man page
# - update HOMEPAGE
# - add optional extra voice support
# 20141020 bkw: fix handy-ruler, make VERSION respect environment.
@ -13,7 +20,7 @@
# http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=flite
VERSION=${VERSION:-1.4}
VERSION=${VERSION:-2.0.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -59,9 +66,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Minor fix to let parallel make succeed. Patch borrowed from gentoo.
patch -p1 < $CWD/flite-1.4-fix-parallel-builds.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@ -83,13 +87,60 @@ rm -rf $PKG/usr/lib$LIBDIRSUFFIX/*.a
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# include any *.flitevox files the user downloaded.
for file in $CWD/*.flitevox; do
[ -e "$file" ] && \
mkdir -p $PKG/usr/share/$PRGNAM && \
cat $file > $PKG/usr/share/$PRGNAM/"$( basename "$file" )" &&
EXTRA=yes
done
# build the docs. NB don't replace subshells with "cd dir" and
# "cd -", as they don't nest.
( cd doc
# build the HTML docs.
make $PRGNAM.html
( cd html
# Upstream hardlinks index.html, use a symlink instead.
rm -f index.html
ln -s ${PRGNAM}_toc.html index.html
# Also, we don't ship the PDF doc, so link to upstream's.
# Fix link to source package.
sed -i \
-e 's,HREF="flite.pdf",HREF="http://www.festvox.org/flite/doc/flite.pdf",' \
-e 's,\.tar\.gz,.tar.bz2,g' \
${PRGNAM}_toc.html
)
# build the GNU info docs
makeinfo $PRGNAM.texi
mkdir -p $PKG/usr/info
gzip -9c < $PRGNAM.info > $PKG/usr/info/$PRGNAM.info.gz
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ACKNOWLEDGEMENTS COPYING README doc/* $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ACKNOWLEDGEMENTS COPYING README doc/html doc/*.txt doc/alice \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
rm -f $PKG/usr/doc/$PRGNAM-$VERSION/Makefile*
# man page written by SlackBuild author.
mkdir -p $PKG/usr/man/man1
gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
# slack-desc gets a note if extra voices are included.
if [ "$EXTRA" = "yes" ]; then
sed '15s,$, This package includes extra voices in /usr/share/flite/,' \
$CWD/slack-desc > $PKG/install/slack-desc
else
cat $CWD/slack-desc > $PKG/install/slack-desc
fi
# doinst.sh needed because we append to /usr/info/dir.
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -1,8 +1,8 @@
PRGNAM="flite"
VERSION="1.4"
HOMEPAGE="http://www.speech.cs.cmu.edu/flite/"
DOWNLOAD="http://www.speech.cs.cmu.edu/flite/packed/flite-1.4/flite-1.4-release.tar.bz2"
MD5SUM="b7c3523b3bbc6f29ce61e6650cd9a428"
VERSION="2.0.0"
HOMEPAGE="http://festvox.org/"
DOWNLOAD="http://festvox.org/flite/packed/flite-2.0/flite-2.0.0-release.tar.bz2"
MD5SUM="645db96ffc296cbb6d37f231cc1cc6b2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""

View file

@ -0,0 +1,125 @@
.. RST source for flite(1) man page. Convert with:
.. rst2man.py flite.rst > flite.1
.. rst2man.py comes from the SBo development/docutils package.
.. |version| replace:: 2.0.0
.. |date| date::
======
flite
======
---------------------------------
a small simple speech synthesizer
---------------------------------
:Manual section: 1
:Manual group: SlackBuilds.org
:Authors: `Alan W. Black`; `Kevin Lorenzo`
:Date: |date|
:Version: |version|
:Copyright: See /usr/doc/flite-|version|/COPYING for full copyright information on flite.
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
SYNOPSIS
========
flite [*-options*] [*text/file*] [*wavefile*]
DESCRIPTION
===========
Converts text in *text/file* to a waveform in *wavefile*.
If *text/file* contains a space, it is treated as a literal
text string and spoken, and not as a file name. If *text/file*
is omitted or **-**, text will be read from standard input.
If *wavefile* is unspecified or **play**, the result is
played on the current systems audio device. If *wavefile*
is **none**, the waveform is discarded (good for benchmarking).
Any other options must appear before *text/file* and/or *wavefile*.
The full documentation for **flite** can be read as a GNU
info file with the command **info flite**, or as HTML in
*/usr/doc/flite-|version|/html/index.html*.
OPTIONS
=======
.. notice the **-opt** *param* stuff? rst's option recognition
.. can't handle non-GNU-style options like -option (it thinks the
.. option is -o, and the ption is the parameter). So we have to help
.. it out a little.
--version Output flite version number
-?, -h, --help
Output usage string
-o WAVEFILE
Explicitly set output filename
-f TEXTFILE
Explicitly set input filename
-t TEXT Explicitly set input textstring
-p PHONES Explicitly set input textstring and synthesize as phones
**--set** *F=V*
Set feature (guesses type)
**-s** *F=V*
Set feature (guesses type)
**--seti** *F=V*
Set int feature
**--setf** *F=V*
Set float feature
**--sets** *F=V*
Set string feature
**-ssml** Read input text/file in ssml mode
-b Benchmark mode
-l Loop endlessly
**-voice** *NAME*
Use voice *NAME* (*NAME* can be filename or url too)
**-voicedir** *NAME*
Directory containing voice data
**-lv**
List voices available
**-add_lex** *FILENAME*
add lex addenda from *FILENAME*
**-pw**
Print words
**-ps**
Print segments
**-psdur**
Print segments and their durations (end-time)
**-pr** *RelName*
Print relation *RelName*
**-voicedump** *FILENAME*
Dump selected (cg) voice to *FILENAME*
-v Verbose mode
SEE ALSO
========
The flite homepage: http://www.festvox.org/flite/