Hey everybody, I'm a graduate student at Carnegie Mellon, and I'm working on a project that wishes to leverage the Sphinx speech-recognition system (also developed at CMU) with asterisk. I see that the EAGI spec provides for an audio stream on fd 3 for this exact purpose, but I can't seem to get it to appear--every time I run my EAGI script (written in C, read()ing fd 3), I get "Resource unavailable", and confirming with a bash script that lists /dev/fd, only 0, 1 and 2 appear--no 3. What gives? Can somebody help me get it to work? Thanks in advance! BTW, I already posted to the dev list, but I got no reply--sorry if this is kinda off topic... -Jeff.
Steven Critchfield
2004-Nov-06 18:52 UTC
[Asterisk-Users] Enhanced Audio Support for EAGIs
On Sat, 2004-11-06 at 19:46 -0500, Jeff Maki wrote:> Hey everybody, > > I'm a graduate student at Carnegie Mellon, and I'm working on a project > that wishes to leverage the Sphinx speech-recognition system (also > developed at CMU) with asterisk. I see that the EAGI spec provides for an > audio stream on fd 3 for this exact purpose, but I can't seem to get it to > appear--every time I run my EAGI script (written in C, read()ing fd 3), I > get "Resource unavailable", and confirming with a bash script that lists > /dev/fd, only 0, 1 and 2 appear--no 3. What gives? > > Can somebody help me get it to work? > > Thanks in advance! > > BTW, I already posted to the dev list, but I got no reply--sorry if this is > kinda off topic...You still need to open the fd on your side. -- Steven Critchfield <critch@basesys.com>
Acting on the suggestion below, I tried running the eagi-test.c demo as is--to see what happens. I got this back from asterisk: ...[snip]... Environment: 'agi_accountcode' is '' Ooh, got a response from Asterisk: '200 result=0 endpos=0' 1. Result is '200 result=0 endpos=0' Ooh, got a response from Asterisk: '200 result=0 endpos=0' 2. Result is '200 result=0 endpos=0' -- Playing 'digits/20' (language 'en') -- Playing 'digits/3' (language 'en') -- Playing 'digits/million' (language 'en') -- Playing 'digits/4' (language 'en') -- Playing 'digits/hundred' (language 'en') Nov 6 23:29:14 WARNING[3353]: file.c:1058 ast_waitstream_full: Wait failed (Broken pipe) Ooh, got a response from Asterisk: '200 result=-1' 3. Result is '200 result=-1' == Spawn extension (default, s, 2) exited non-zero on 'SIP/jmaki-8572' Got hungup on apparently Failed to execute command Asterisk is running on FreeBSD here, and I tried taking down the firewall--no go. Now this is a *new* problem--what does this "Wait failed" thing mean? I'm not sure if fd 3 is working or not, but the script doesn't... any ideas? Thanks in advance, -Jeff.> On Sat, 2004-11-06 at 21:50 -0500, Jeff Maki wrote: >> Thanks for replying, and I apologize for turning this into a "C support" >> question, but which function should I use to open the fd? I always >> thought the fd was already open--open simply returned a fd for a file? >> Does asterisk create a fifo somewhere I need to open()? >> >> It's not very well documented, so thanks again for offering a suggestion! > > I think it is well documented. Whats wrong with eagi-sphinx-test.c, or > eagi-test.c? Both are written in C and one specifically does a portion > of what you want already. > > -- > Steven Critchfield <critch@basesys.com> > >
Hi, I'd just like to say that I'm interested in this thing. Do you intend to use Sphinx 4 ? Can sphinx use HTK HMM models files ? Please keep us posted on progress.... Regards, Robert. ----- Original Message ----- From: "Jeff Maki" <jmaki@andrew.cmu.edu> To: <asterisk-users@lists.digium.com> Sent: Sunday, November 07, 2004 1:46 AM Subject: [Asterisk-Users] Enhanced Audio Support for EAGIs> Hey everybody, > > I'm a graduate student at Carnegie Mellon, and I'm working on a project > that wishes to leverage the Sphinx speech-recognition system (also > developed at CMU) with asterisk. I see that the EAGI spec provides for an > audio stream on fd 3 for this exact purpose, but I can't seem to get it to > appear--every time I run my EAGI script (written in C, read()ing fd 3), I > get "Resource unavailable", and confirming with a bash script that lists > /dev/fd, only 0, 1 and 2 appear--no 3. What gives? > > Can somebody help me get it to work? > > Thanks in advance! > > BTW, I already posted to the dev list, but I got no reply--sorry if thisis> kinda off topic... > > -Jeff. > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
I had similar problem on FreeBSD with DeadAGI. In the beginning all worked, but when I configured noload => pbx_wilcalu.so not to load CPU, I started to get disconnects with file.c:1058 ast_waitstream_full: Wait failed Just let asterisk have 99% CPU and load wilcalu and everythong be ok, I hope.