]> git.pld-linux.org Git - packages/festival.git/commitdiff
- added patch for Asterisk PBX
authoradasi <adasi@pld-linux.org>
Tue, 17 Jun 2003 18:03:40 +0000 (18:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    festival-asterisk.patch -> 1.1
    festival.spec -> 1.14

festival-asterisk.patch [new file with mode: 0644]
festival.spec

diff --git a/festival-asterisk.patch b/festival-asterisk.patch
new file mode 100644 (file)
index 0000000..8f7b347
--- /dev/null
@@ -0,0 +1,75 @@
+diff -u -r festival-1.4.2/lib/tts.scm festival-1.4.2-asterisk/lib/tts.scm
+--- festival-1.4.2/lib/tts.scm Wed Jan  8 09:54:14 2003
++++ festival-1.4.2-asterisk/lib/tts.scm        Tue Jan  7 08:51:44 2003
+@@ -236,6 +236,15 @@
+        (utt.synth
+       (eval (list 'Utterance 'Text string))))))
++(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)))))
++
+ (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.2/src/arch/festival/wave.cc festival-1.4.2-asterisk/src/arch/festival/wave.cc
+--- festival-1.4.2/src/arch/festival/wave.cc   Mon Jun  4 07:40:10 2001
++++ festival-1.4.2-asterisk/src/arch/festival/wave.cc  Tue Jan  7 08:53:09 2003
+@@ -377,6 +377,38 @@
+       type = "nist";
+     else
+       type = get_c_string(ltype);
++
++    w->save(tmpfile,type);
++    write(ft_server_socket,"WV\n",3);
++    socket_send_file(ft_server_socket,tmpfile);
++    unlink(tmpfile);
++
++    return utt;
++}
++
++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);
+     write(ft_server_socket,"WV\n",3);
+     socket_send_file(ft_server_socket,tmpfile);
+@@ -454,6 +486,13 @@
+  "(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.");
++
++    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");
++
+     init_subr_1("send_sexpr_to_client", send_sexpr_to_client,
+  "(send_sexpr_to_client SEXPR)\n\
+ Sends given sexpression to currently connected client.");
index 1787b8fbebede34ffaa88f32b0e6296c80efb7dd..4448dcc73c5e3db57b79b2aeda70642730feeb86 100644 (file)
@@ -2,7 +2,7 @@ Summary:        The Festival speech sythesis system
 Summary(pl):   System syntezy mowy Festival
 Name:          festival
 Version:       1.4.2
-Release:       4
+Release:       5
 License:       GPL
 Group:         Applications/Sound
 Source0:       http://www.cstr.ed.ac.uk/download/festival/%{version}/%{name}-%{version}-release.tar.gz
@@ -16,6 +16,7 @@ Source3:      http://www.cstr.ed.ac.uk/download/festival/%{version}/festvox_us3.tar.g
 Source4:       http://www.cstr.ed.ac.uk/download/festival/%{version}/festvox_en1.tar.gz
 # Source4-md5: 66e3bc07751d7e31826185649c5ada5a
 Patch0:                %{name}-config.patch
+Patch1:                %{name}-asterisk.patch
 URL:           http://www.cstr.ed.ac.uk/projects/festival/
 BuildRequires: automake
 BuildRequires: speech_tools-devel
@@ -80,7 +81,7 @@ Pliki potrzebne do u
 %prep
 %setup -q -n %{name} -b1 -b2 -b3 -b4
 %patch0 -p1
-
+%patch1 -p1
 %build
 cp -f /usr/share/automake/config.* .
 %configure2_13
This page took 0.102283 seconds and 4 git commands to generate.