Hi, i recently installed festival and try to use app_festival. But so
far is nor working, it seems is a problem with the festival server, not
the app_festival itself. However Im not sure if the behaviour of
app_festival is "right". Let me explain:<br>
<br>
i have in extensions.conf<br>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
<pre>[festival]
exten => _X.,1,Answer
exten => _X.,2,Festival('this is a festival test')
exten => _X.,3,Hangup()</pre>i have the festival server started.<br>
when i dial my test extension, app_festival connects just fine to the festival server, no error in<br>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
<pre>ast_log(LOG_WARNING,"festival_client: connect to server failed\n");<br></pre><br>
the call just stays there, doing nothing, and checking `ps ax | grep
festival` i realized that the server is no longer running, so i suppose
i have to check why is going down when i try to run app_festival, any
way, the application should return an error or something, dont you
think?<br>
<br>
i made the next small change to the code of app_festival:<br>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
<pre>--- app_festival.c.orig 2005-11-26 13:20:31.559912680 +0000
+++ app_festival.c 2005-11-26 13:23:15.766949416 +0000
@@ -424,8 +424,17 @@
/* This assumes only one waveform will come back, also LP is unlikely */
wave = 0;
do {
+ int fd_read;
for (n=0; n < 3; )
+ {
+ fd_read = read(fd,ack+n,3-n);
+ if ( fd_read == -1 )
+ {
+ ast_log(LOG_WARNING, "Unable to read cache or festival response fd");
+ return -1;
+ }
n += read(fd,ack+n,3-n);
+ }
ack[3] = '\0';
if (strcmp(ack,"WV\n") == 0) { /* receive a waveform */
ast_log(LOG_DEBUG,"Festival WV command\n");</pre><br>
just testing if its still possible to read from the file descriptor, otherwise return -1 and display a warning, in order<br>
to not being reading indefinitly<br>
<br>
best regards.<br>
<br>
-- <br>"Su nombre es GNU/Linux, no solamente Linux, mas info en <a href="http://www.gnu.org">http://www.gnu.org</a>"