From: spencer l. <spe...@gm...> - 2010-02-08 18:48:30
|
Hi, Sorry for mixing up the emails and missing this one. I can see the configuration and the docs explaining it need to be improved and simplified. I think you are close. Let me try to explain the steps you should take . To start, you will need to run 4 scripts. (later we can talk about consolidating it into a single script) 1. Run Cairo (the MRCPv2 Server) SCRIPT1: rserver.sh (run this first) SCRIPT2: transmitter1.sh SCRIPT3: receiver1.sh (this script uses cairoconfig.xml, which is where you can specify your own sphinx-config.xml file) 2. Run Zanzibar in pbx mode SCRIPT4: asteriskconnector.sh (this script uses pbxconfig.xml) Modify pbxConfig Change cairoSipHostName to the ip address of the machine running cairo mysipaddress does not need to be changed. In the dialplan change x-application:basic|org.speechforge.apps.demos.Parrot to x-application:beanid|Parrot to Twinkle Looks ok. I have had some trouble using localhost and 127.0.0.1 in my sip addresses. If 1001at127.0.0.1 does not work try switching to the ip address of the ip address of the machine running asterisk. I hope this helps, Spencer On Tue, Jan 19, 2010 at 3:29 AM, johny jj2 <joh...@gm...> wrote: > Thank you for your answer! > > > > 1. There are three config files with the same things, e.g. all > withcairo.xml, democonfig.xml and pbxconfig.xml contain > <value>192.168.0.103</value>. I decided to make changes only in > pbxconfig.xml. (I also had to copy the whole config directory as > explained in one of previous mails, because one of scripts couldn't be > executed). > > > > 2. I changed in pbxconfig.xml mySipAddress from > sip:cai...@sp... <sip%3Ac...@sp...> to > sip:mainaccount@localhost (this is > what I see in my linux terminal) and IP from 192.168.0.100 to > 192.168.1.101 (which is shown by ifconfig for my wifi card). What > should be the value of mySipAddress and cairoSipAddress? > > > > I call from Twinkle to 1001at127.0.0.1 (of course instead of 'at' I > write the symbol @). > > > > Asterisk in verbose mode shows: > > > > -- Executing [1001@default:1] > SIPAddHeader("SIP/localhost-00000000", > "x-channel:SIP/localhost-00000000") in new stack > > -- Executing [1001@default:2] > SIPAddHeader("SIP/localhost-00000000", > "x-application:basic|org.speechforge.apps.demos.Parrot") in new stack > > -- Executing [1001@default:3] Dial("SIP/localhost-00000000", > "SIP/Zanzibar") in new stack > > -- Called Zanzibar > > -- SIP/Zanzibar-00000001 is ringing > > localhost*CLI> > > == Spawn extension (default, 1001, 3) exited non-zero on > 'SIP/localhost-00000000' > > localhost*CLI> > > > > And fourth script (asteriskConnector.sh): > > > > ***: 127.0.0.1 > > Connecting to 192.168.0.103:5038 > > Got an invite request > > Got a dialog terminated even > > > > In this case Twinkle rings all the time and cannot connect. > > > > 3. Instead of 192.168.1.101 I write 127.0.0.1. > > > > Asterisk in verbose mode: > > > > localhost*CLI> > > -- Executing [1001@default:1] > SIPAddHeader("SIP/localhost-00000004", > "x-channel:SIP/localhost-00000004") in new stack > > -- Executing [1001@default:2] > SIPAddHeader("SIP/localhost-00000004", > "x-application:basic|org.speechforge.apps.demos.Parrot") in new stack > > -- Executing [1001@default:3] Dial("SIP/localhost-00000004", > "SIP/Zanzibar") in new stack > > -- Called Zanzibar > > -- SIP/Zanzibar-00000005 is ringing > > -- SIP/Zanzibar-00000005 answered SIP/localhost-00000004 > > localhost*CLI> > > == Spawn extension (default, 1001, 3) exited non-zero on > 'SIP/localhost-00000004' > > > > Fourth script (asteriskConnector.sh): > > > > *: 127.0.0.1 > > Connecting to 192.168.0.103:5038 > > Got an invite request > > Received an unhandled SIP response status code (ignoring it): 183 : > Session progress > > java.lang.Exception: Application Type basic not supported > I apologize for this bug/problem with docs. I recommend using the beanid approach (see above) and configuring the bean with Spring in pbxconfig. , but if you want to specify the classname, use the keyword "className" rather than "basic" (case sensitive, another bug). Make sure you have a mrcp server (cairo) running too > > > > In this case Asterisk receives the call from Twinkle immediately but > then nothing happens. The session is established, the timer in Twinkle > shows how much time ago but nothing else happens. > > > > --- > > > > Ports are correctly set. For Twinkle, SIP listens on 5061, for > Asterisk 5060, openIVR 5090 and Cairo 5050. (Asterisk is informed in > sip.conf that Zanzibar is on port 5090). I checked "netstat -l -p" > after running all four scripts and Asterisk. It looks like Asterisk > listens on all IP numbers (*) and port 5060 and Java listens only on > localhost (typically 127.0.0.1). > > > > In extensions.conf in [demo] section I've got: > > exten => 1001,1,SIPAddHeader(x-channel:${CHANNEL}) > > exten => > 1001,n,SIPAddHeader(x-application:basic|org.speechforge.apps.demos.Parrot) > > exten => 1001,n,Dial(SIP/Zanzibar) > > The exten which you specified in docs didn't work because of ',n' in > first line instead of ',1'. > > > ====================================== > > Summing up: I'm worried about this "java.lang.Exception: Application > Type basic not supported" because it looks like Zanzibar/Cairo doesn't > understand type which is dedicated for it. I'm also not sure what to > do with 192.168.0.103:5038. And I don't quite get why there are the > same things in three config files. What should I set for mySipAddress > and cairoSipAddress in pbxconfig.xml? > ====================================== > > > > --- > > > > To answer your earlier question about getting results with plain old java > -- without tags and grammars. You dont need to use tags -- you could > analyze the raw string in java when you get the results. But at least with > sphinx4, you need to either use a grammar or a language model to define > what can be said. > > > > I am thinking about adding a simple grammar feature, where you just > supply a list of words. Would that be helpful? > > > > I think it would. I just would like to have everything in java file > without grammar and vxml, in similar way as it is in HelloDigits in > Sphinx4, where the grammar is the simplest possible. (So that I would > have value of string type in java code. Every time the code would be > checking if this string is empty or not. If it is not, I would enter > the given loop which would check what word it is. According to what > word it is, it would be able to follow some kind of action, like > calculating the sum or saving results to text file. Then the string > would be empty again and I would be waiting for the other time when > something is recognized and the string in nonempty again. This > approach wouldn't require any vxml and it requires very simple grammar > with only list of words). So that's the question about how to analyze > those raw results. And about language model, I needed to create it > with lmtoolkit available on-line and include it in acoustic model but > it is used only for big dictionaries I guess. > At present you will need to specify a simple jsgf grammar. Evn HelloDigits uses a simple jsgf grammar digits.gram I will add a word list grammar to the enhancement list for cairo. > > > I also thought about the way of creating the application and > recompiling the whole Cairo/Zanzibar. I need to create my app and add > my acoustic model. (I hope there wouldn't be any problem with loaders > of acoustic model, perhaps I need to use loaders of Sphinx3 for my > model). I think the only what I need is to make changes to content of > zanzibar-0.1-bin.src.bz2 and I don't need content of those other > archives like rtp-0.2 and client-0.2. (Again, there are the same files > in src/voicexml and demo/voicexml, which do I need? I think creating > my application would be just creating MyApp.java in > src/java/org/speechforge/apps/demos, creating MyApp.gram in > src/resources/grammar, adding my wav files to src/resources/prompts, > editing sphinx-config.xml in src/resources/config to replace WSJ with > my acoustic model, adding the same grammar to src/voicexml, adding > empty [can it be empty file? if not, what should be here?] MyApp.vxml > to src/voicexml if it is possible not to use any vxml. But if I don't > use vxml, how to use wav files from /src/resources/prompts in > MyApp.java from /src/java/org/speechforge/apps/demos? I mean what code > would be responsible for that? Do I miss anything in the process of > developing the application?). Then I would need to recompile it > because I've got new apps and other acoustic model. In Sphinx4 the > recompiling is very simple task, it is simply running 'ant' in its > main directory, which recompiles only those files which need to be > recompiled due to some changes. Is there similar simple way to do it > with Zanzibar? > You should not have to recompile or modify zanziabr or cairo. 1. Use cairo-config to specify own your sphinx-config.xml file (with your own acoustic models) 2. create your own jar file with your own app and add to the lib directory of zanzibar 3. Configure your app using spring (look at examples in pbxconfig, notice the prompts and grammars are specified here. They need not be in prompts or grammars directory. They can be anywhere you specify.) One issue is that we have bundled an older version of sphinx4 in cairo. We should do a new release with the latest version with the newer acoustic model jar code) > > > But first and most important thing is about running this parrot > example as explained earlier in this mail. > > > > Thanks again! > > Regards! > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for > Conference > attendees to learn about information security's most important issues > through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > cairo-user mailing list > cai...@li... > https://lists.sourceforge.net/lists/listinfo/cairo-user > |