diff --git a/audio/speech-dispatcher/Makefile b/audio/speech-dispatcher/Makefile new file mode 100755 index 00000000000..749e662dfc5 --- /dev/null +++ b/audio/speech-dispatcher/Makefile @@ -0,0 +1,70 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2011/10/20 11:28:27 ajacoutot Exp $ + +COMMENT= common interface to speech synthesis + +DISTNAME= speech-dispatcher-0.7.1 + +SHARED_LIBS += sdaudio 0.0 # 2.4 +SHARED_LIBS += speechd 0.0 # 5.0 + +CATEGORIES= audio + +HOMEPAGE= http://devel.freebsoft.org/speechd + +# GPLv2 +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +WANTLIB += ao c dotconf-1.1 espeak glib-2.0 gmodule-2.0 gthread-2.0 +WANTLIB += m pcre portaudio pthread sndfile sndio stdc++ + +MASTER_SITES= http://devel.freebsoft.org/pub/projects/speechd/ + +MODULES= devel/gettext \ + lang/python + +MODPY_ADJ_FILES=src/python/speechd_config/spd-conf \ + src/python/speechd/_test.py + +LIB_DEPENDS= audio/espeak \ + audio/libao \ + audio/libsndfile \ + devel/dotconf \ + devel/glib2 + +USE_LIBTOOL= Yes + +CONFIGURE_STYLE=gnu +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" +CONFIGURE_ARGS= ${CONFIGURE_SHARED} \ + --with-libao \ + --with-espeak \ + --without-flite \ + --without-ibmtts \ + --without-ivona \ + --without-nas \ + --without-oss \ + --without-alsa \ + --without-pulse + + +FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/speech-dispatcher + +pre-configure: + perl -pi -e 's,-lpthread,-pthread,g' \ + ${WRKSRC}/configure \ + ${WRKSRC}/src/audio/Makefile.in \ + ${WRKSRC}/src/server/Makefile.in \ + ${WRKSRC}/src/tests/Makefile.in \ + ${WRKSRC}/src/modules/Makefile.in \ + ${WRKSRC}/src/c/api/Makefile.in \ + ${WRKSRC}/src/c/clients/say/Makefile.in \ + ${WRKSRC}/src/c/clients/spdsend/Makefile.in + perl -pi -e 's,/usr/share,${LOCALBASE}/share,g;' \ + -e 's,/usr/bin,${LOCALBASE}/bin,g' \ + ${WRKSRC}/config/modules/*.conf + +.include diff --git a/audio/speech-dispatcher/distinfo b/audio/speech-dispatcher/distinfo new file mode 100644 index 00000000000..a1bfd49e900 --- /dev/null +++ b/audio/speech-dispatcher/distinfo @@ -0,0 +1,5 @@ +MD5 (speech-dispatcher-0.7.1.tar.gz) = zPwwrABmc9NrQiPrdg7Wlg== +RMD160 (speech-dispatcher-0.7.1.tar.gz) = E/iJwlNBmFzix1eH8mDcmZCRsfA= +SHA1 (speech-dispatcher-0.7.1.tar.gz) = vpEd4e8zT6FwinSJ+d3lG0masmU= +SHA256 (speech-dispatcher-0.7.1.tar.gz) = qKnPKZRH30ZF02xkmXfgB6MFDMrst/d+IWUAHsV5SlE= +SIZE (speech-dispatcher-0.7.1.tar.gz) = 1144818 diff --git a/audio/speech-dispatcher/patches/patch-config_speechd_conf b/audio/speech-dispatcher/patches/patch-config_speechd_conf new file mode 100644 index 00000000000..d551074d9f3 --- /dev/null +++ b/audio/speech-dispatcher/patches/patch-config_speechd_conf @@ -0,0 +1,21 @@ +$OpenBSD: patch-config_speechd_conf,v 1.1.1.1 2011/10/20 11:28:38 ajacoutot Exp $ +--- config/speechd.conf.orig Thu Oct 20 11:19:47 2011 ++++ config/speechd.conf Thu Oct 20 11:20:46 2011 +@@ -162,7 +162,7 @@ DefaultVolume 100 + # different sound systems and provides alternative output for Pulse Audio + # and ALSA as well as for other backends. + +-# AudioOutputMethod "pulse" ++AudioOutputMethod "libao" + + # -- Pulse Audio parameters -- + +@@ -207,7 +207,7 @@ DefaultVolume 100 + # either relative (to etc/speechd/modules/) or absolute + + AddModule "espeak" "sd_espeak" "espeak.conf" +-AddModule "festival" "sd_festival" "festival.conf" ++#AddModule "festival" "sd_festival" "festival.conf" + #AddModule "flite" "sd_flite" "flite.conf" + #AddModule "ivona" "sd_ivona" "ivona.conf" + #AddModule "espeak-generic" "sd_generic" "espeak-generic.conf" diff --git a/audio/speech-dispatcher/patches/patch-configure b/audio/speech-dispatcher/patches/patch-configure new file mode 100644 index 00000000000..025b0e3f021 --- /dev/null +++ b/audio/speech-dispatcher/patches/patch-configure @@ -0,0 +1,45 @@ +$OpenBSD: patch-configure,v 1.1.1.1 2011/10/20 11:28:38 ajacoutot Exp $ +--- configure.orig Fri Sep 10 16:39:19 2010 ++++ configure Thu Oct 20 11:03:29 2011 +@@ -11036,41 +11036,6 @@ else + echo "*** Required math library missing! See INSTALL .";exit 1 + fi + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5 +-$as_echo_n "checking for main in -ldl... " >&6; } +-if test "${ac_cv_lib_dl_main+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-ldl $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +- +-int +-main () +-{ +-return main (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_dl_main=yes +-else +- ac_cv_lib_dl_main=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_main" >&5 +-$as_echo "$ac_cv_lib_dl_main" >&6; } +-if test "x$ac_cv_lib_dl_main" = x""yes; then : +- echo "" +-else +- echo "*** Required dl library missing! See INSTALL .";exit 1 +-fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldotconf" >&5 + $as_echo_n "checking for main in -ldotconf... " >&6; } diff --git a/audio/speech-dispatcher/patches/patch-src_c_clients_spdsend_common_c b/audio/speech-dispatcher/patches/patch-src_c_clients_spdsend_common_c new file mode 100644 index 00000000000..74b9e70cff2 --- /dev/null +++ b/audio/speech-dispatcher/patches/patch-src_c_clients_spdsend_common_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-src_c_clients_spdsend_common_c,v 1.1.1.1 2011/10/20 11:28:38 ajacoutot Exp $ +--- src/c/clients/spdsend/common.c.orig Thu Oct 20 10:52:21 2011 ++++ src/c/clients/spdsend/common.c Thu Oct 20 10:52:31 2011 +@@ -23,6 +23,7 @@ + + + #include ++#include + #include + #include + diff --git a/audio/speech-dispatcher/patches/patch-src_modules_espeak_c b/audio/speech-dispatcher/patches/patch-src_modules_espeak_c new file mode 100644 index 00000000000..6ae44e2fe2b --- /dev/null +++ b/audio/speech-dispatcher/patches/patch-src_modules_espeak_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_modules_espeak_c,v 1.1.1.1 2011/10/20 11:28:38 ajacoutot Exp $ +--- src/modules/espeak.c.orig Thu Oct 20 10:53:31 2011 ++++ src/modules/espeak.c Thu Oct 20 10:53:42 2011 +@@ -32,7 +32,7 @@ + #include + + /* espeak header file */ +-#include ++#include + #ifndef ESPEAK_API_REVISION + #define ESPEAK_API_REVISION 1 + #endif diff --git a/audio/speech-dispatcher/patches/patch-src_python_speechd_config_config_py b/audio/speech-dispatcher/patches/patch-src_python_speechd_config_config_py new file mode 100644 index 00000000000..58b7831509b --- /dev/null +++ b/audio/speech-dispatcher/patches/patch-src_python_speechd_config_config_py @@ -0,0 +1,63 @@ +$OpenBSD: patch-src_python_speechd_config_config_py,v 1.1.1.1 2011/10/20 11:28:38 ajacoutot Exp $ +--- src/python/speechd_config/config.py.orig Thu Oct 20 12:34:18 2011 ++++ src/python/speechd_config/config.py Thu Oct 20 12:42:28 2011 +@@ -181,6 +181,15 @@ class Options(object): + 'command_line' : ('', '--test-pulse'), + }, + ++ 'test_libao': ++ { ++ 'descr' : "Test libao audio", ++ 'doc' : None, ++ 'type' : bool, ++ 'default' : False, ++ 'command_line' : ('', '--test-libao'), ++ }, ++ + 'use_espeak_synthesis': + { + 'descr' : "Use espeak to synthesize messages", +@@ -435,6 +444,11 @@ is not installed.""") + report("Testing PULSE sound output") + return self.audio_try_play(type='pulse') + ++ def test_alsa(self): ++ """Test libao sound output""" ++ report("Testing libao sound output") ++ return self.audio_try_play(type='libao') ++ + def diagnostics(self, speechd_running = True, output_modules=[], audio_output=[]): + + """Perform a complete diagnostics""" +@@ -486,6 +500,10 @@ what is wrong)""", True): + if self.test_pulse(): + working_audio += ["pulse"] + ++ if decide_to_test('libao', "libao sound system", audio_output): ++ if self.test_pulse(): ++ working_audio += ["libao"] ++ + report("Testing whether Python Speech Dispatcher library is in path and importable") + python_speechd_working = test.python_speechd_in_path() + +@@ -736,8 +754,8 @@ Do you want to keep it?""", False) + + self.default_audio_method = question_with_suggested_answers( + "Default audio output method", +- "pulse", +- ["pulse", "alsa", "oss", "pulse,alsa"]) ++ "libao", ++ ["libao", "pulse", "alsa", "oss", "pulse,alsa"]) + + self.default_speech_rate = question( + "Default speech rate (on the scale of -100..100, 0 is default, 50 is faster, -50 is slower)", +@@ -897,6 +915,9 @@ def main(): + + elif options.test_pulse: + test.audio_try_play(type='pulse') ++ ++ elif options.test_libao: ++ test.audio_try_play(type='libao') + + elif options.diagnostics: + ret = test.diagnostics() diff --git a/audio/speech-dispatcher/patches/patch-src_server_speechd_c b/audio/speech-dispatcher/patches/patch-src_server_speechd_c new file mode 100644 index 00000000000..517966264f5 --- /dev/null +++ b/audio/speech-dispatcher/patches/patch-src_server_speechd_c @@ -0,0 +1,14 @@ +$OpenBSD: patch-src_server_speechd_c,v 1.1.1.1 2011/10/20 11:28:38 ajacoutot Exp $ +--- src/server/speechd.c.orig Thu Oct 20 12:09:41 2011 ++++ src/server/speechd.c Thu Oct 20 12:09:52 2011 +@@ -605,8 +605,10 @@ speechd_init() + if (g_module_supported() == FALSE) + DIE("Loadable modules not supported by current platform.\n"); + ++#if 0 + if(_POSIX_VERSION < 199506L) + DIE("This system doesn't support POSIX.1c threads\n"); ++#endif + + /* Fill GlobalFDSet with default values */ + GlobalFDSet.min_delay_progress = 2000; diff --git a/audio/speech-dispatcher/patches/patch-src_server_speechd_h b/audio/speech-dispatcher/patches/patch-src_server_speechd_h new file mode 100644 index 00000000000..04c6fb39a55 --- /dev/null +++ b/audio/speech-dispatcher/patches/patch-src_server_speechd_h @@ -0,0 +1,29 @@ +$OpenBSD: patch-src_server_speechd_h,v 1.1.1.1 2011/10/20 11:28:38 ajacoutot Exp $ + +speechd.h:63: error: redefinition of 'union semun' + +--- src/server/speechd.h.orig Fri Sep 10 10:23:55 2010 ++++ src/server/speechd.h Thu Oct 20 10:51:36 2011 +@@ -27,12 +27,12 @@ + + #define _GNU_SOURCE + +-#include + #include + #include + #include + #include + #include ++#include + + #include + #include +@@ -56,7 +56,7 @@ + /* TODO: This fixes compilation for Mac OS X but might not be a correct + solution for other platforms. A better check is needed, possibly including + _POSIX_C_SOURCE and friends*/ +-#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || defined(__APPLE__) ++#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || defined(__APPLE__) || defined(__OpenBSD__) + /* union semun is defined by including */ + #else + /* according to X/OPEN we have to define it ourselves */ diff --git a/audio/speech-dispatcher/pkg/DESCR b/audio/speech-dispatcher/pkg/DESCR new file mode 100644 index 00000000000..2be4d4b381a --- /dev/null +++ b/audio/speech-dispatcher/pkg/DESCR @@ -0,0 +1,17 @@ +The Speech Dispatcher project provides a high-level device independent +layer for access to speech synthesis through a simple, stable and well +documented interface. + +Key features: + o Common interface to different TTS engines. + o Handling concurrent synthesis requests - requests may come + assynchronously from multiple sources within an application and/or + from different applications. + o Subsequent serialization, resolution of conflicts and priorities + of incomming requests. + o Context switching - state is maintained for each client connection + independently, event for connections from within one application. + o High-level client interfaces for popular programming languages. + o Common sound output handling - audio playback is handled by Speech + Dispatcher rather than the TTS engine, since most engines have + limited sound output capabilities. diff --git a/audio/speech-dispatcher/pkg/PLIST b/audio/speech-dispatcher/pkg/PLIST new file mode 100644 index 00000000000..eb82792f232 --- /dev/null +++ b/audio/speech-dispatcher/pkg/PLIST @@ -0,0 +1,110 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2011/10/20 11:28:38 ajacoutot Exp $ +@bin bin/clibrary +@bin bin/clibrary2 +@bin bin/connection_recovery +@bin bin/long_message +@bin bin/run_test +bin/spd-conf +@bin bin/spd-say +@bin bin/spdsend +@bin bin/speech-dispatcher +include/libspeechd.h +@info info/spd-say.info +@info info/speech-dispatcher.info +@info info/ssip.info +lib/libspeechd.a +lib/libspeechd.la +@lib lib/libspeechd.so.${LIBspeechd_VERSION} +lib/python${MODPY_VERSION}/site-packages/speechd/ +lib/python${MODPY_VERSION}/site-packages/speechd/__init__.py +lib/python${MODPY_VERSION}/site-packages/speechd/__init__.pyc +lib/python${MODPY_VERSION}/site-packages/speechd/__init__.pyo +lib/python${MODPY_VERSION}/site-packages/speechd/_test.py +lib/python${MODPY_VERSION}/site-packages/speechd/_test.pyc +lib/python${MODPY_VERSION}/site-packages/speechd/_test.pyo +lib/python${MODPY_VERSION}/site-packages/speechd/client.py +lib/python${MODPY_VERSION}/site-packages/speechd/client.pyc +lib/python${MODPY_VERSION}/site-packages/speechd/client.pyo +lib/python${MODPY_VERSION}/site-packages/speechd/paths.py +lib/python${MODPY_VERSION}/site-packages/speechd/paths.pyc +lib/python${MODPY_VERSION}/site-packages/speechd/paths.pyo +lib/python${MODPY_VERSION}/site-packages/speechd_config/ +lib/python${MODPY_VERSION}/site-packages/speechd_config/__init__.py +lib/python${MODPY_VERSION}/site-packages/speechd_config/__init__.pyc +lib/python${MODPY_VERSION}/site-packages/speechd_config/__init__.pyo +lib/python${MODPY_VERSION}/site-packages/speechd_config/config.py +lib/python${MODPY_VERSION}/site-packages/speechd_config/config.pyc +lib/python${MODPY_VERSION}/site-packages/speechd_config/config.pyo +lib/python${MODPY_VERSION}/site-packages/speechd_config/paths.py +lib/python${MODPY_VERSION}/site-packages/speechd_config/paths.pyc +lib/python${MODPY_VERSION}/site-packages/speechd_config/paths.pyo +lib/speech-dispatcher/ +lib/speech-dispatcher-modules/ +@bin lib/speech-dispatcher-modules/sd_cicero +@bin lib/speech-dispatcher-modules/sd_dummy +@bin lib/speech-dispatcher-modules/sd_espeak +@bin lib/speech-dispatcher-modules/sd_festival +@bin lib/speech-dispatcher-modules/sd_generic +lib/speech-dispatcher/libsdaudio.a +lib/speech-dispatcher/libsdaudio.la +@lib lib/speech-dispatcher/libsdaudio.so.${LIBsdaudio_VERSION} +share/examples/speech-dispatcher/ +share/examples/speech-dispatcher/speech-dispatcher/ +@sample ${SYSCONFDIR}/speech-dispatcher/ +share/examples/speech-dispatcher/speech-dispatcher/clients/ +@sample ${SYSCONFDIR}/speech-dispatcher/clients/ +share/examples/speech-dispatcher/speech-dispatcher/clients/emacs.conf +@sample ${SYSCONFDIR}/speech-dispatcher/clients/emacs.conf +share/examples/speech-dispatcher/speech-dispatcher/clients/gnome-speech.conf +@sample ${SYSCONFDIR}/speech-dispatcher/clients/gnome-speech.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/ +@sample ${SYSCONFDIR}/speech-dispatcher/modules/ +share/examples/speech-dispatcher/speech-dispatcher/modules/cicero.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/cicero.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/dtk-generic.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/dtk-generic.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/epos-generic.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/epos-generic.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/espeak-generic.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/espeak-generic.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/espeak-mbrola-generic.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/espeak-mbrola-generic.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/espeak.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/espeak.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/festival.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/festival.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/flite.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/flite.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/ibmtts.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/ibmtts.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/ivona.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/ivona.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/llia_phon-generic.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/llia_phon-generic.conf +share/examples/speech-dispatcher/speech-dispatcher/modules/swift-generic.conf +@sample ${SYSCONFDIR}/speech-dispatcher/modules/swift-generic.conf +share/examples/speech-dispatcher/speech-dispatcher/speechd.conf +@sample ${SYSCONFDIR}/speech-dispatcher/speechd.conf +share/sounds/ +share/sounds/speech-dispatcher/ +share/sounds/speech-dispatcher/dummy-message.wav +share/sounds/speech-dispatcher/test.wav +share/speech-dispatcher/ +share/speech-dispatcher/conf/ +share/speech-dispatcher/conf/clients/ +share/speech-dispatcher/conf/clients/emacs.conf +share/speech-dispatcher/conf/clients/gnome-speech.conf +share/speech-dispatcher/conf/modules/ +share/speech-dispatcher/conf/modules/cicero.conf +share/speech-dispatcher/conf/modules/dtk-generic.conf +share/speech-dispatcher/conf/modules/epos-generic.conf +share/speech-dispatcher/conf/modules/espeak-generic.conf +share/speech-dispatcher/conf/modules/espeak-mbrola-generic.conf +share/speech-dispatcher/conf/modules/espeak.conf +share/speech-dispatcher/conf/modules/festival.conf +share/speech-dispatcher/conf/modules/flite.conf +share/speech-dispatcher/conf/modules/ibmtts.conf +share/speech-dispatcher/conf/modules/ivona.conf +share/speech-dispatcher/conf/modules/llia_phon-generic.conf +share/speech-dispatcher/conf/modules/swift-generic.conf +share/speech-dispatcher/conf/speechd.conf diff --git a/audio/speech-dispatcher/speech-dispatche.core b/audio/speech-dispatcher/speech-dispatche.core new file mode 100644 index 00000000000..cf18e5b3853 Binary files /dev/null and b/audio/speech-dispatcher/speech-dispatche.core differ