diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2004-02-10 19:14:48 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2004-02-10 19:14:48 +0000 |
commit | 7353da29f1c00586902903747e61c3e21fa4faa5 (patch) | |
tree | 15161897ced7049ed972af715909a108d63fed3d | |
parent | Added media-sound/festival:asterisk (diff) | |
download | historical-7353da29f1c00586902903747e61c3e21fa4faa5.tar.gz historical-7353da29f1c00586902903747e61c3e21fa4faa5.tar.bz2 historical-7353da29f1c00586902903747e61c3e21fa4faa5.zip |
Added optional patch that adds a new command named tts_textasterisk that is required by Asterisk to communicate with the Festival server. Submitted by Ray Russell Reese III <anti@gentoo.org> in bug #30456.
-rw-r--r-- | media-sound/festival/ChangeLog | 6 | ||||
-rw-r--r-- | media-sound/festival/Manifest | 6 | ||||
-rw-r--r-- | media-sound/festival/festival-1.4.3.ebuild | 10 | ||||
-rw-r--r-- | media-sound/festival/files/festival-1.4.3-asterisk.patch | 93 | ||||
-rw-r--r-- | media-sound/festival/metadata.xml | 5 |
5 files changed, 114 insertions, 6 deletions
diff --git a/media-sound/festival/ChangeLog b/media-sound/festival/ChangeLog index d0df74580fb2..5a4b3bed0503 100644 --- a/media-sound/festival/ChangeLog +++ b/media-sound/festival/ChangeLog @@ -3,6 +3,12 @@ # $Header: /home/cvsroot/gentoo-x86/media-sound/festival/ChangeLog,v 1 2002/05/07 # 03:58:19 naz Exp $ + 10 Feb 2004; Jeremy Huddleston <eradicator@gentoo.org> + festival-1.4.3.ebuild, metadata.xml, files/festival-1.4.3-asterisk.patch: + Added optional patch that adds a new command named tts_textasterisk that is + required by Asterisk to communicate with the Festival server. Submitted by Ray + Russell Reese III <anti@gentoo.org> in bug #30456. + 25 Jan 2004; <carpaski@gentoo.org> festival-1.4.2*: Fixed all references to $T as that is a portage variable and yields AccessViolations when set incorrectly. diff --git a/media-sound/festival/Manifest b/media-sound/festival/Manifest index 1d65ac4a8644..cacaac7a4edc 100644 --- a/media-sound/festival/Manifest +++ b/media-sound/festival/Manifest @@ -1,12 +1,14 @@ -MD5 40deb4cf905aa7ae7822b94d2df2b62f festival-1.4.3.ebuild 6330 +MD5 479eccae5e1064b8bf737abb93181f06 festival-1.4.3.ebuild 6398 MD5 64bf5532193189d45e21bfcb91f32347 festival-1.4.2-r1.ebuild 6394 MD5 5350bfb44d71fed50e58b3d869a5a5cc festival-1.4.2-r3.ebuild 6381 MD5 88fd790a9b900bf31395e96520493340 festival-1.4.2.ebuild 1843 -MD5 076d4c4f4c9b2b54da2e5c7d3a6ecec1 ChangeLog 2570 +MD5 89114e4e405da439f0d35b10b8c358d1 ChangeLog 2916 +MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158 MD5 6790c5b575213a3fc776a1bef28e1f74 festival-1.4.2-r2.ebuild 6506 MD5 4dc97895cbe241e9b03132de8c1079fd files/digest-festival-1.4.2 947 MD5 f38f904b9dfc77c788a63f51ccd2abb7 files/digest-festival-1.4.3 863 MD5 44bdf5d07947b391cecc75ed8ca49445 files/festival-1.4.2.patch 8724 +MD5 b380d6440fe49096f7705d6f1adf01ee files/festival-1.4.3-asterisk.patch 3028 MD5 70fe1c867e8782c7ff288056677fda0c files/festival-gcc3.3.diff 5257 MD5 e2882c47fc5e3eab44b08f2ab31deedb files/digest-festival-1.4.2-r1 942 MD5 e2882c47fc5e3eab44b08f2ab31deedb files/digest-festival-1.4.2-r2 942 diff --git a/media-sound/festival/festival-1.4.3.ebuild b/media-sound/festival/festival-1.4.3.ebuild index 2d495a9729dc..df7cc6c23fb7 100644 --- a/media-sound/festival/festival-1.4.3.ebuild +++ b/media-sound/festival/festival-1.4.3.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/festival/festival-1.4.3.ebuild,v 1.3 2003/09/11 01:21:31 msterret Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/festival/festival-1.4.3.ebuild,v 1.4 2004/02/10 19:14:48 eradicator Exp $ S=${WORKDIR}/${PN} DESCRIPTION="Festival Text to Speech engine" -GCCPV=`cc -dumpversion` -IUSE="" +GCCPV=`gcc -dumpversion` +IUSE="asterisk" HOMEPAGE="http://www.cstr.ed.ac.uk/" SITE="http://www.speech.cs.cmu.edu/${PN}/cstr/${PN}/${PV}" @@ -50,6 +50,8 @@ src_unpack() { unpack festvox_us2.tar.gz unpack festvox_us3.tar.gz epatch ${FILESDIR}/${PN}-gcc3.3.diff + + use asterisk && epatch ${FILESDIR}/${P}-asterisk.patch } src_compile() { diff --git a/media-sound/festival/files/festival-1.4.3-asterisk.patch b/media-sound/festival/files/festival-1.4.3-asterisk.patch new file mode 100644 index 000000000000..d6d7885e1949 --- /dev/null +++ b/media-sound/festival/files/festival-1.4.3-asterisk.patch @@ -0,0 +1,93 @@ +diff -u -r festival-1.4.3/lib/tts.scm festival-1.4.3-asterisk/lib/tts.scm +--- festival-1.4.3.orig/lib/tts.scm 2003-01-09 07:39:22.000000000 -0800 ++++ festival/lib/tts.scm 2003-08-14 12:07:00.000000000 -0700 +@@ -234,6 +234,17 @@ + (utt.synth + (eval (list 'Utterance 'Text string)))))) + ++;; begin tts_textasterisk ++(define (tts_textasterisk string mode) ++ "(tts_textasterisk STRING MODE) ++Apply tts to STRING. This function is specifically designed for ++use in server mode so a single function call may synthesize the string. ++This function name may be added to the server safe functions." ++ (utt.send.wave.asterisk ++ (utt.synth ++ (eval (list 'Utterance 'Text string))))) ++;; end tts_textasterisk ++ + (define (tts_return_to_client) + "(tts_return_to_client) + This function is called by clients who wish to return waveforms of +diff -u -r festival-1.4.3/src/arch/festival/wave.cc festival-1.4.3-asterisk/src/arch/festival/wave.cc +--- festival-1.4.3.orig/src/arch/festival/wave.cc 2003-01-13 11:09:55.000000000 -0800 ++++ festival/src/arch/festival/wave.cc 2003-08-14 12:10:53.000000000 -0700 +@@ -381,6 +381,7 @@ + type = "nist"; + else + type = get_c_string(ltype); ++ + w->save(tmpfile,type); + #ifdef WIN32 + send(ft_server_socket,"WV\n",3,0); +@@ -393,6 +394,44 @@ + return utt; + } + ++// begin utt_send_wave_asterisk() ++static LISP utt_send_wave_asterisk(LISP utt) ++{ ++ // Send the waveform to a client (must be acting as server) ++ EST_Utterance *u = utterance(utt); ++ EST_Wave *w; ++ EST_String tmpfile = make_tmp_filename(); ++ LISP ltype; ++ EST_String type; ++ ++ w = get_utt_wave(u); ++ if (ft_server_socket == -1) ++ { ++ cerr << "utt_send_wave_client: not in server mode" << endl; ++ festival_error(); ++ } ++ ++ ltype = ft_get_param("Wavefiletype"); ++ if (ltype == NIL) ++ type = "nist"; ++ else ++ type = get_c_string(ltype); ++ w->resample(8000); ++ w->rescale(5); ++ ++ w->save(tmpfile,type); ++#ifdef WIN32 ++ send(ft_server_socket,"WV\n",3,0); ++#else ++ write(ft_server_socket,"WV\n",3); ++#endif ++ socket_send_file(ft_server_socket,tmpfile); ++ unlink(tmpfile); ++ ++ return utt; ++} ++// end utt_send_wave_asterisk() ++ + static LISP send_sexpr_to_client(LISP l) + { + EST_String tmpfile = make_tmp_filename(); +@@ -465,6 +504,15 @@ + "(utt.send.wave.client UTT)\n\ + Sends wave in UTT to client. If not in server mode gives an error\n\ + Note the client must be expecting to receive the waveform."); ++ ++// begin asterisk mod ++ init_subr_1("utt.send.wave.asterisk",utt_send_wave_asterisk, ++ "(utt.send.wave.asterisk UTT)\n\ ++ Sends wave in UTT to client. If not in server mode gives an error\n\ ++ Note the client must be expecting to receive the waveform. The waveform\ ++ is rescaled and resampled according to what asterisk needs"); ++// end asterisk mod ++ + init_subr_1("send_sexpr_to_client", send_sexpr_to_client, + "(send_sexpr_to_client SEXPR)\n\ + Sends given sexpression to currently connected client."); diff --git a/media-sound/festival/metadata.xml b/media-sound/festival/metadata.xml new file mode 100644 index 000000000000..e1774e3d9ad7 --- /dev/null +++ b/media-sound/festival/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sound</herd> +</pkgmetadata> |