summaryrefslogtreecommitdiff
path: root/audio/espeak
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2007-07-17 19:18:44 +0000
committerdrochner <drochner@pkgsrc.org>2007-07-17 19:18:44 +0000
commit44e7a0317aa17d51ca42829e499736a98700c8db (patch)
tree325dcc881ae8715b033ebc335f41fa90b13df0af /audio/espeak
parent36409fa33b045f17dff26e0471b90b9d55d87034 (diff)
downloadpkgsrc-44e7a0317aa17d51ca42829e499736a98700c8db.tar.gz
import espeak-1.28, a speech synthesizer
(It is GPLv3; up to version 1.26 it was GPLv2 but those are too buggy to be used with gnome-speech.)
Diffstat (limited to 'audio/espeak')
-rw-r--r--audio/espeak/DESCR6
-rw-r--r--audio/espeak/Makefile28
-rw-r--r--audio/espeak/PLIST149
-rw-r--r--audio/espeak/buildlink3.mk21
-rw-r--r--audio/espeak/distinfo8
-rw-r--r--audio/espeak/patches/patch-aa22
-rw-r--r--audio/espeak/patches/patch-ab22
-rw-r--r--audio/espeak/patches/patch-ac45
8 files changed, 301 insertions, 0 deletions
diff --git a/audio/espeak/DESCR b/audio/espeak/DESCR
new file mode 100644
index 00000000000..0ebc3826a0d
--- /dev/null
+++ b/audio/espeak/DESCR
@@ -0,0 +1,6 @@
+eSpeak is a compact open source software speech synthesizer for English and
+other languages.
+eSpeak produces good quality English speech. It uses a different synthesis
+method from other open source TTS engines, and sounds quite different.
+It's perhaps not as natural or "smooth", but I find the articulation clearer
+and easier to listen to for long periods.
diff --git a/audio/espeak/Makefile b/audio/espeak/Makefile
new file mode 100644
index 00000000000..1d655cf688b
--- /dev/null
+++ b/audio/espeak/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/07/17 19:18:44 drochner Exp $
+#
+
+DISTNAME= espeak-1.28-source
+PKGNAME= espeak-1.28
+CATEGORIES= audio
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=espeak/}
+EXTRACT_SUFX= .zip
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://espeak.sourceforge.net/
+COMMENT= Speech synthesizer
+
+USE_LANGUAGES= c++
+USE_TOOLS+= gmake
+WRKSRC= ${WRKDIR}/espeak-1.28-source/src
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/espeak ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/libespeak.so.1.1.28 ${PREFIX}/lib
+ ${LN} -sf ${PREFIX}/lib/libespeak.so.1.1.28 ${PREFIX}/lib/libespeak.so.1
+ ${LN} -sf ${PREFIX}/lib/libespeak.so.1.1.28 ${PREFIX}/lib/libespeak.so
+ ${INSTALL_DATA} ${WRKSRC}/libespeak.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/speak_lib.h ${PREFIX}/include
+ ${CP} -r ${WRKDIR}/espeak-1.28-source/espeak-data ${PREFIX}/share
+
+.include "../../audio/portaudio/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/espeak/PLIST b/audio/espeak/PLIST
new file mode 100644
index 00000000000..ffba6092f05
--- /dev/null
+++ b/audio/espeak/PLIST
@@ -0,0 +1,149 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/07/17 19:18:44 drochner Exp $
+bin/espeak
+include/speak_lib.h
+lib/libespeak.a
+lib/libespeak.so
+lib/libespeak.so.1
+lib/libespeak.so.1.${PKGVERSION}
+share/espeak-data/af_dict
+share/espeak-data/config
+share/espeak-data/cs_dict
+share/espeak-data/cy_dict
+share/espeak-data/de_dict
+share/espeak-data/el_dict
+share/espeak-data/en_dict
+share/espeak-data/eo_dict
+share/espeak-data/es_dict
+share/espeak-data/fi_dict
+share/espeak-data/fr_dict
+share/espeak-data/hi_dict
+share/espeak-data/hr_dict
+share/espeak-data/hu_dict
+share/espeak-data/is_dict
+share/espeak-data/it_dict
+share/espeak-data/la_dict
+share/espeak-data/mbrola_ph/af1_phtrans
+share/espeak-data/mbrola_ph/ca1_phtrans
+share/espeak-data/mbrola_ph/cr1_phtrans
+share/espeak-data/mbrola_ph/cs_phtrans
+share/espeak-data/mbrola_ph/de4_phtrans
+share/espeak-data/mbrola_ph/de5_phtrans
+share/espeak-data/mbrola_ph/en1_phtrans
+share/espeak-data/mbrola_ph/fr1_phtrans
+share/espeak-data/mbrola_ph/gr2_phtrans
+share/espeak-data/mbrola_ph/hu1_phtrans
+share/espeak-data/mbrola_ph/it3_phtrans
+share/espeak-data/mbrola_ph/la1_phtrans
+share/espeak-data/mbrola_ph/nl_phtrans
+share/espeak-data/mbrola_ph/pl1_phtrans
+share/espeak-data/mbrola_ph/ro1_phtrans
+share/espeak-data/mbrola_ph/sv_phtrans
+share/espeak-data/mbrola_ph/us3_phtrans
+share/espeak-data/mbrola_ph/us_phtrans
+share/espeak-data/mk_dict
+share/espeak-data/nl_dict
+share/espeak-data/no_dict
+share/espeak-data/phondata
+share/espeak-data/phondata-manifest
+share/espeak-data/phonindex
+share/espeak-data/phontab
+share/espeak-data/pl_dict
+share/espeak-data/pt_dict
+share/espeak-data/ro_dict
+share/espeak-data/ru_dict
+share/espeak-data/sk_dict
+share/espeak-data/sv_dict
+share/espeak-data/sw_dict
+share/espeak-data/vi_dict
+share/espeak-data/voices/!v/!variant1
+share/espeak-data/voices/!v/!variant11
+share/espeak-data/voices/!v/!variant12
+share/espeak-data/voices/!v/!variant13
+share/espeak-data/voices/!v/!variant14
+share/espeak-data/voices/!v/!variant2
+share/espeak-data/voices/!v/!variant3
+share/espeak-data/voices/!v/!variant4
+share/espeak-data/voices/!v/!variant5
+share/espeak-data/voices/!v/!variant6
+share/espeak-data/voices/af
+share/espeak-data/voices/cs
+share/espeak-data/voices/cy
+share/espeak-data/voices/de
+share/espeak-data/voices/default
+share/espeak-data/voices/el
+share/espeak-data/voices/en/en
+share/espeak-data/voices/en/en-croak
+share/espeak-data/voices/en/en-n
+share/espeak-data/voices/en/en-r
+share/espeak-data/voices/en/en-rp
+share/espeak-data/voices/en/en-sc
+share/espeak-data/voices/en/en-wisper
+share/espeak-data/voices/en/en-wm
+share/espeak-data/voices/eo
+share/espeak-data/voices/es
+share/espeak-data/voices/fi
+share/espeak-data/voices/fr
+share/espeak-data/voices/hi
+share/espeak-data/voices/hr
+share/espeak-data/voices/hu
+share/espeak-data/voices/is
+share/espeak-data/voices/it
+share/espeak-data/voices/la
+share/espeak-data/voices/mb/mb-af1
+share/espeak-data/voices/mb/mb-af1-en
+share/espeak-data/voices/mb/mb-cr1
+share/espeak-data/voices/mb/mb-cz2
+share/espeak-data/voices/mb/mb-de4
+share/espeak-data/voices/mb/mb-de4-en
+share/espeak-data/voices/mb/mb-de5
+share/espeak-data/voices/mb/mb-de5-en
+share/espeak-data/voices/mb/mb-de7
+share/espeak-data/voices/mb/mb-en1
+share/espeak-data/voices/mb/mb-fr1
+share/espeak-data/voices/mb/mb-fr1-en
+share/espeak-data/voices/mb/mb-fr4
+share/espeak-data/voices/mb/mb-fr4-en
+share/espeak-data/voices/mb/mb-gr2
+share/espeak-data/voices/mb/mb-gr2-en
+share/espeak-data/voices/mb/mb-hu1
+share/espeak-data/voices/mb/mb-hu1-en
+share/espeak-data/voices/mb/mb-it3
+share/espeak-data/voices/mb/mb-it4
+share/espeak-data/voices/mb/mb-la1
+share/espeak-data/voices/mb/mb-nl2
+share/espeak-data/voices/mb/mb-nl2-en
+share/espeak-data/voices/mb/mb-pl1
+share/espeak-data/voices/mb/mb-pl1-en
+share/espeak-data/voices/mb/mb-ro1
+share/espeak-data/voices/mb/mb-ro1-en
+share/espeak-data/voices/mb/mb-sw1
+share/espeak-data/voices/mb/mb-sw1-en
+share/espeak-data/voices/mb/mb-sw2
+share/espeak-data/voices/mb/mb-sw2-en
+share/espeak-data/voices/mb/mb-us1
+share/espeak-data/voices/mb/mb-us2
+share/espeak-data/voices/mb/mb-us3
+share/espeak-data/voices/mk
+share/espeak-data/voices/nl
+share/espeak-data/voices/no
+share/espeak-data/voices/pl
+share/espeak-data/voices/pt
+share/espeak-data/voices/pt-pt
+share/espeak-data/voices/ro
+share/espeak-data/voices/ru
+share/espeak-data/voices/sk
+share/espeak-data/voices/sv
+share/espeak-data/voices/sw
+share/espeak-data/voices/vi
+share/espeak-data/voices/zhy
+share/espeak-data/zhy_dict
+@dirrm share/espeak-data/voices/mb
+@dirrm share/espeak-data/voices/en
+@dirrm share/espeak-data/voices/!v
+@dirrm share/espeak-data/voices
+@exec ${MKDIR} %D/share/espeak-data/soundicons
+@dirrm share/espeak-data/soundicons
+@dirrm share/espeak-data/mbrola_ph
+@exec ${MKDIR} %D/share/espeak-data/mbrola
+@dirrm share/espeak-data/mbrola
+@dirrm share/espeak-data
diff --git a/audio/espeak/buildlink3.mk b/audio/espeak/buildlink3.mk
new file mode 100644
index 00000000000..721c13b5293
--- /dev/null
+++ b/audio/espeak/buildlink3.mk
@@ -0,0 +1,21 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2007/07/17 19:18:44 drochner Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+ESPEAK_BUILDLINK3_MK:= ${ESPEAK_BUILDLINK3_MK}+
+
+.if ${BUILDLINK_DEPTH} == "+"
+BUILDLINK_DEPENDS+= espeak
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nespeak}
+BUILDLINK_PACKAGES+= espeak
+BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}espeak
+
+.if ${ESPEAK_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.espeak+= espeak>=1.26
+BUILDLINK_PKGSRCDIR.espeak?= ../../audio/espeak
+.endif # ESPEAK_BUILDLINK3_MK
+
+.include "../../audio/portaudio/buildlink3.mk"
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/audio/espeak/distinfo b/audio/espeak/distinfo
new file mode 100644
index 00000000000..55c73aa347a
--- /dev/null
+++ b/audio/espeak/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/07/17 19:18:44 drochner Exp $
+
+SHA1 (espeak-1.28-source.zip) = e2c017c821ee93b28a70de1027591bb999365622
+RMD160 (espeak-1.28-source.zip) = e48f57daca3710326b0918c3adf6cc444830c7fc
+Size (espeak-1.28-source.zip) = 1054248 bytes
+SHA1 (patch-aa) = 8e67be9cb1f82a66132196b8dcab16c996b6914d
+SHA1 (patch-ab) = b4eb69f17a4bf8b3f64624fec283126e970dd781
+SHA1 (patch-ac) = 19607eb203f8af5172ca92ec95a4fd394ff20b44
diff --git a/audio/espeak/patches/patch-aa b/audio/espeak/patches/patch-aa
new file mode 100644
index 00000000000..833739f6546
--- /dev/null
+++ b/audio/espeak/patches/patch-aa
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/07/17 19:18:44 drochner Exp $
+
+--- event.cpp.orig 2007-07-17 14:24:45.000000000 +0200
++++ event.cpp
+@@ -398,10 +398,14 @@ ENTER("sleep_until_timeout_or_stop_reque
+ to.tv_sec, to.tv_nsec,
+ ts.tv_sec, ts.tv_nsec);
+
+- while ((err = sem_timedwait(&my_sem_stop_is_required, &ts)) == -1
+- && errno == EINTR)
++ while ((err = sem_trywait(&my_sem_stop_is_required)) == -1
++ && (errno == EINTR || errno == EAGAIN))
+ {
+- continue; // Restart when interrupted by handler
++ struct timespec help;
++ clock_gettime2(&help);
++ if (timespeccmp(&help, &ts, >=))
++ break;
++ sched_yield();
+ }
+
+ assert (gettimeofday(&tv, NULL) != -1);
diff --git a/audio/espeak/patches/patch-ab b/audio/espeak/patches/patch-ab
new file mode 100644
index 00000000000..c7654e673f0
--- /dev/null
+++ b/audio/espeak/patches/patch-ab
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/07/17 19:18:44 drochner Exp $
+
+--- fifo.cpp.orig 2007-07-17 14:50:26.000000000 +0200
++++ fifo.cpp
+@@ -306,10 +306,14 @@ int sleep_until_start_request_or_inactiv
+ to.tv_sec, to.tv_nsec,
+ ts.tv_sec, ts.tv_nsec);
+
+- while ((err = sem_timedwait(&my_sem_start_is_required, &ts)) == -1
+- && errno == EINTR)
++ while ((err = sem_trywait(&my_sem_start_is_required)) == -1
++ && (errno == EINTR || errno == EAGAIN))
+ {
+- continue;
++ struct timespec help;
++ clock_gettime2(&help);
++ if (timespeccmp(&help, &ts, >=))
++ break;
++ sched_yield();
+ }
+
+ assert (gettimeofday(&tv, NULL) != -1);
diff --git a/audio/espeak/patches/patch-ac b/audio/espeak/patches/patch-ac
new file mode 100644
index 00000000000..e67d1ecefbb
--- /dev/null
+++ b/audio/espeak/patches/patch-ac
@@ -0,0 +1,45 @@
+$NetBSD: patch-ac,v 1.1.1.1 2007/07/17 19:18:44 drochner Exp $
+
+--- Makefile.orig 2007-06-08 12:21:45.000000000 +0200
++++ Makefile
+@@ -1,7 +1,7 @@
+ BINDIR=/usr/bin
+ INCDIR=/usr/include/espeak
+ LIBDIR=/usr/lib
+-DATADIR=/usr/share/espeak-data
++DATADIR=${PREFIX}/share/espeak-data
+
+ RELEASE = 1.28
+ BIN_NAME = speak
+@@ -26,18 +26,19 @@ libespeak_SOURCES = speak_lib.cpp compil
+ tr_languages.cpp voices.cpp wavegen.cpp phonemelist.cpp \
+ espeak_command.cpp event.cpp fifo.cpp wave.cpp debug.cpp
+
++LPATH= -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib
+
+ SRCS1=$(speak_SOURCES)
+ OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
+-LIBS1=-lstdc++ -lportaudio -lpthread
++LIBS1=-lstdc++ $(LPATH) -lportaudio -lpthread
+
+ SRCS2=$(libespeak_SOURCES)
+ OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))
+-LIBS2=-lstdc++ -lportaudio -lpthread
++LIBS2=-lstdc++ $(LPATH) -lportaudio -lpthread
+
+ SRCS3 = espeak.cpp
+ OBJS3=$(patsubst %.cpp,%.o,$(SRCS3))
+-LIBS3=-lstdc++ ./libespeak.so
++LIBS3=-lstdc++ $(LPATH) ./libespeak.so
+
+ CXXFLAGS=-O2
+
+@@ -58,7 +59,7 @@ $(BIN2_NAME): $(OBJS3) $(LIB_NAME)
+
+ x_%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -Wall -fpic -fvisibility=hidden -pedantic \
+- -I. -D LIBRARY -c -fno-exceptions $< -o x_$*.o
++ -I. -DLIBRARY -DPATH_ESPEAK_DATA=\"$(DATADIR)\" -c -fno-exceptions $< -o x_$*.o
+
+ $(LIB_NAME): $(OBJS2)
+ $(CXX) -shared -Wl,-soname,$(LIB_NAME).$(LIB_VERSION) -o $@ $(OBJS2) $(LIBS2)