From a399bd9fe5940198d6a9b4b205c116d44f135bdb Mon Sep 17 00:00:00 2001 From: B. Watson Date: Thu, 19 Dec 2019 05:05:20 -0500 Subject: accessibility/espeak: Add pulseaudio, make portaudio optional. Signed-off-by: B. Watson --- accessibility/espeak/README | 32 +++++++++--- accessibility/espeak/espeak.1 | 62 ++++++++++++++++------ accessibility/espeak/espeak.SlackBuild | 96 ++++++++++++++++++++++------------ accessibility/espeak/espeak.info | 2 +- accessibility/espeak/makefile.patch | 17 ------ accessibility/espeak/slack-desc | 2 +- 6 files changed, 134 insertions(+), 77 deletions(-) delete mode 100644 accessibility/espeak/makefile.patch (limited to 'accessibility') diff --git a/accessibility/espeak/README b/accessibility/espeak/README index 19f50b44bc..2016c84024 100644 --- a/accessibility/espeak/README +++ b/accessibility/espeak/README @@ -6,14 +6,30 @@ quite different. It's perhaps not as natural or "smooth", but some find the articulation clearer and easier to listen to for long periods. It can run as a command line program to speak text from a file or from stdin. -To build without portaudio support, set WAVONLY=yes in the script's -environment. +Build options (environment variables): -If you get errors like this: +PULSE Build PulseAudio output support (yes/no)? Default is "yes". -bt_audio_service_open: connect() failed: Connection refused (111) +PORTAUDIO Build PortAudio output support (yes/no/auto)? Default is "auto", + which will build in PortAudio support if it's installed. -...either ignore them (if espeak produces audio anyway), or comment out -the 'pcm.headset' and 'ctl.headset' stanzas in /etc/asound.conf. This -should only happen if your Slackware system was upgraded from an older -version. +Use PortAudio[1] for plain ALSA[2] audio output, if you don't want to use +PulseAudio. However, if you're happy with PulseAudio, it's recommended NOT +to build PortAudio support into espeak (you won't need it anyway). + +Note that if both options are "no" (or if PULSE=no and portaudio isn't +autodetected), the resulting binary will not be able to make sound +(it will only produce .wav files). + +The slack-desc will be updated to let you know which audio drivers +(if any) were included. + +[1] Using PortAudio with espeak results in a lot of scary-looking + warnings from espeak, but you can ignore them so long as you + can hear its speech. + +[2] Or JACK audio, if your portaudio package was built with jack2 or + jack-audio-connection-kit installed. Or... PortAudio can also feed + audio to PulseAudio, if its daemon is running. Or, if you have OSS + modules loaded, PortAudio can use that, too. The Linux audio driver + ecosystem is a really weird place. diff --git a/accessibility/espeak/espeak.1 b/accessibility/espeak/espeak.1 index c4bb0ea2f1..525f7624cc 100644 --- a/accessibility/espeak/espeak.1 +++ b/accessibility/espeak/espeak.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH ESPEAK 1 "June 23, 2006" +.TH ESPEAK 1 "August 6, 2010" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -16,7 +16,7 @@ .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME -espeak \- A multi-lingual software speech synthesizer. +espeak \- A multi\-lingual software speech synthesizer. .SH SYNOPSIS .B espeak .RI [ options ]\ [ "" ] @@ -28,59 +28,89 @@ is a software speech synthesizer for English, and some other languages. .B \-h Show summary of options. .TP +.B \-\-version +Prints the espeak library version and the location of the espeak voice data. +.TP .B \-f Text file to speak .TP .B \-\-stdin Read text input from stdin instead of a file .TP -If neither -f nor --stdin, are spoken, or if none then text is spoken from stdin, each line separately. +If neither \-f nor \-\-stdin, are spoken, or if none then text is spoken from stdin, each line separately. .TP .B \-q -Quiet, don't produce any speech (may be useful with -x) +Quiet, don't produce any speech (may be useful with \-x) .TP .B \-a -Amplitude, 0 to 20, default is 10 +Amplitude, 0 to 200, default is 100 +.TP +.B \-g +Word gap. Pause between words, units of 10mS at the default speed +.TP +.B \-k +Indicate capital letters with: 1=sound, 2=the word "capitals", higher values = a pitch increase (try \-k20). .TP .B \-l Line length. If not zero (which is the default), consider -lines less than this length as and-of-clause +lines less than this length as and\-of\-clause .TP .B \-p Pitch adjustment, 0 to 99, default is 50 .TP .B -s -peed in words per minute, default is 160 +Speed in words per minute, default is 160 .TP .B \-v -Use voice file of this name from espeak-data/voices -.TP -.B -m -Indicates that the text contains SSML (Speech Synthesis Markup Language) tags or other XML tags. Those SSML tags which are supported are interpreted. Other tags, including HTML, are ignored, except that some HTML tags such as

and
  • ensure a break in the speech. +Use voice file of this name from espeak\-data/voices .TP .B \-w Write output to this WAV file, rather than speaking it directly .TP +.B -b +Input text encoding, 1=UTF8, 2=8 bit, 4=16 bit +.TP +.B -m +Indicates that the text contains SSML (Speech Synthesis Markup Language) tags or other XML tags. Those SSML tags which are supported are interpreted. Other tags, including HTML, are ignored, except that some HTML tags such as

    and
  • ensure a break in the speech. +.TP .B \-x Write phoneme mnemonics to stdout .TP .B \-X -Write phonemes mnemonics and translation trace to stdout +Write phonemes mnemonics and translation trace to stdout. If rules files have been built with --compile=debug, line numbers will also be displayed. +.TP +.B \-z +No final sentence pause at the end of the text .TP .B \-\-stdout Write speech output to stdout .TP -.B \-\-compile= +.B \-\-compile=voicename Compile the pronunciation rules and dictionary in the current directory. = is optional and specifies which language .TP +.B \-\-compile=debug +Compile the pronunciation rules and dictionary in the current directory as above, but include line numbers, that get shown when -X is used. +.TP +.B \-\-ipa +Write phonemes to stdout using International Phonetic Alphabet. --ipa=1 Use ties, --ipa=2 Use ZWJ, --ipa=3 Separate with _ +.TP +.B \-\-path= +Specifies the directory containing the espeak-data directory +.TP +.B \-\-pho +Write mbrola phoneme data (.pho) to stdout or to the file in --phonout +.TP +.B \-\-phonout= +Write output from -x -X commands and mbrola phoneme data to this file +.TP .B \-\-punct="" Speak the names of punctuation characters during speaking. If = is omitted, all punctuation is spoken. .TP -.B \-k -Indicate capital letters with: 1=sound, 2=the word "capitals", higher values = a pitch increase (try -k20). -.TP .B \-\-voices[=] Lists the available voices. If = is present then only those voices which are suitable for that language are listed. +.TP +.B \-\-voices= +lists the voices in the specified subdirectory. .SH AUTHOR eSpeak was written by Jonathan Duddington . The webpage for this package can be found at http://espeak.sourceforge.net/. .PP diff --git a/accessibility/espeak/espeak.SlackBuild b/accessibility/espeak/espeak.SlackBuild index fb2d960c0c..1a6402a5d3 100644 --- a/accessibility/espeak/espeak.SlackBuild +++ b/accessibility/espeak/espeak.SlackBuild @@ -6,9 +6,18 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20191218 bkw: +# - BUILD=2 +# - Update man page (still using the one from Debian). +# - It turns out espeak supports PulseAudio, so that's now the default. +# - Remove portaudio from REQUIRES. +# - Add PULSE and PORTAUDIO environment variables, update README. +# - Simplify the script (unfortunately it had to get more complex +# again to support the new variables). + PRGNAM=espeak VERSION=${VERSION:-1.48.04} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -40,63 +49,82 @@ fi set -e +# Support old WAVONLY variable, but don't mention it in README. +if [ "${WAVONLY:-no}" = "yes" ]; then + PULSE=no + PORTAUDIO=no +fi + +# Preemptively support -current's pure-alsa-system: if pulseaudio's +# not installed (it normally is on 14.2), just build without it. +PULSE="${PULSE:-yes}" +pkg-config --exists libpulse || PULSE=no + +case "${PORTAUDIO:-auto}" in + yes) if ! pkg-config --exists portaudio-2.0; then + cat < $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \; # Man page from Debian 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 -if [ "${WAVONLY:-no}" = "yes" ]; then - sed -i \ - '19s/:/: This package lacks audio support (wav file output only)/' \ - $PKG/install/slack-desc -fi +sed "s,@DRIVERS@,$DRIVERS," \ + $CWD/slack-desc \ + > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/accessibility/espeak/espeak.info b/accessibility/espeak/espeak.info index 380f4b6368..5a5e640d7b 100644 --- a/accessibility/espeak/espeak.info +++ b/accessibility/espeak/espeak.info @@ -5,6 +5,6 @@ DOWNLOAD="http://downloads.sourceforge.net/espeak/espeak-1.48.04-source.zip" MD5SUM="cadd7482eaafe9239546bdc09fa244c3" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="portaudio" +REQUIRES="" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" diff --git a/accessibility/espeak/makefile.patch b/accessibility/espeak/makefile.patch deleted file mode 100644 index ce3f2e7679..0000000000 --- a/accessibility/espeak/makefile.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur espeak-1.44.05-source/src/Makefile espeak-1.44.05-source.patched/src/Makefile ---- espeak-1.44.05-source/src/Makefile 2010-08-13 17:35:09.000000000 -0400 -+++ espeak-1.44.05-source.patched/src/Makefile 2010-12-26 19:31:55.000000000 -0500 -@@ -113,11 +113,9 @@ - $(MKDIR) $(DESTDIR)$(INCDIR) - $(MKDIR) $(DESTDIR)$(DATADIR) - # Install espeak executable -- $(INSTALL) -m 755 $(BIN2_NAME) $(DESTDIR)$(BINDIR) -+ $(INSTALL) -s -m 755 $(BIN2_NAME) $(DESTDIR)$(BINDIR) - # Install shared library -- $(INSTALL) -m 755 $(LIB_NAME).$(LIBTAG) $(DESTDIR)$(LIBDIR) -- # Install static library -- $(INSTALL) -m 755 $(STATIC_LIB_NAME) $(DESTDIR)$(LIBDIR) -+ $(INSTALL) -s -m 755 $(LIB_NAME).$(LIBTAG) $(DESTDIR)$(LIBDIR) - $(LN_SF) $(LIB_NAME).$(LIBTAG) $(DESTDIR)$(LIBDIR)/$(LIB_NAME).$(LIB_VERSION) - $(LN_SF) $(LIB_NAME).$(LIB_VERSION) $(DESTDIR)$(LIBDIR)/$(LIB_NAME) - # Install development headers diff --git a/accessibility/espeak/slack-desc b/accessibility/espeak/slack-desc index 18cc43f6cd..41a3727eac 100644 --- a/accessibility/espeak/slack-desc +++ b/accessibility/espeak/slack-desc @@ -15,5 +15,5 @@ espeak: but some find the articulation clearer and easier to listen to for espeak: long periods. It can run as a command line program to speak text from espeak: a file or from stdin. espeak: -espeak: +espeak: Supported audio ouput drivers: @DRIVERS@ espeak: -- cgit v1.2.3