vxi-discuss



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Prompt interface question



Vincent,

I'm 100% not sure if this is the right way to do it, but I think to
implement the builtin grammars without using a real grammar, we can
determine in process_rec_result() which field type (builtin grammar) is
active, then try to match the result against it. That way, we don't need to
worry about a real grammar for a while. I had to modify rec_qa.c to get the
builtin type in process_rec_result(). 

Here's what I think the grammar for "digits?length=10" may look like in
JSGF:
<10-digits>=(<digit><digit><digit><digit><digit><digit><digit><digit><digit>
<digit><digit>)
<digit>=0|1|2|3|4|5|6|7|8|9
Nuance grammar has the similiar format.

Jeff

 
-----Original Message-----
From: vincent ribiere [mailto:ribiere@cisco.com]
Sent: Tuesday, March 06, 2001 4:27 PM
To: Jeff Tang
Cc: vxi-discuss@speechinfo.org
Subject: Re: Prompt interface question


Jeff, 
Thanks. Yes, that's what I was planning to do in the short term. 
However, I have an issue with that: the VXI engine always expect a grammar 
from the recognition interface. For instance, in process_rec_result(), the
code looks at the 
grammar type to decide what action it should take. 
I guess we could fake the API and build an empty grammar object with just
the 
grammar type being set and no real grammar? Does the VXI really need a
grammar from the 
recognition interface ? 
  
Also when a real grammar is available, I was wondering how the grammar would
look like 
(with JSGF for instance) for built-in types like "digits?length=10". 
Vincent 
  
  
Vincent, 
I've been looking for the same open-source implementatuin of JSGF.. But if 
you just want to make those built-in types of grammars work within the 
<field> element, you may check the built-in type name (without using a 
general grammar mechanism) inside QArecRecognize or your own implementation 
of the VXIrecRecognize API: 
      for(i=0;i<tp->ngrams;i++) 
        { 
        rec_gram_t* gr = (rec_gram_t*)tp->grams[i]; 
        if (gr->enabled == 1) 
                printf("enabled, grammar=%s\n", 
VXIStringValue(VXIObjectGetProperty(gr->fetchobj,URL_REL_URL))); 
          ... 
      } 
After you get the type name "builtin:digits?length=10", you can do 
appropriate things. Later on, when you have a general impl of a grammar, you

can replace the special-handling code with it. 
Does this make sense to you? I'm trying the same thing here... 
Jeff 
-----Original Message----- 
From: vincent ribiere [mailto:ribiere@cisco.com] 
Sent: Tuesday, March 06, 2001 3:11 PM 
To: rick@tgflinux.com 
Cc: speechworks 
Subject: Re: Prompt interface question 
Rick, 
Thanks for your answers: I hope this mailing list is going to have more and 
more 
traffic. 
I'm currently working on the telephony interface using the SIP stack and 
User Agent 
from Vovida (www.vovida.org), the goal being to have a fully open-source 
solution. 
I was planning to use Festival and Sphinx later on and I'm therefore really 
interested 
in your work in that area - do you plan to open-source some of the APIs and 
when ? 
Also I did not get any feedback to my DTMF question yet so if you have any 
input 
it's not too late ;-). As there is no archive yet, I just append my 
question again 
- sorry about that. 
Thanks, 
Vincent 
"I'm trying to use the recognition interface to receive DTMF digits 
sequences. 
It works fine when I need to recognize single digits as the grammar is 
relatively simple: 
for instance if I'm only expected 1,2 or 3 in a field, the following works 
fine: 
<field name="main_choice"> 
      <dtmf> 1| 2 | 3 </dtmf> 
</field> 
But if I need to obtain a certain number of digits from the user (e.g. a 
phone number 
with 10 digits), I run into problems as the following is not supported: 
<field name ="extension"  type="digits?length=10" > 
    <prompt> Enter the 10 digits extension of the user you want to reach 
    </prompt> 
 </field> 
It seems I need a more elaborate support for grammars but does anyone know 
a way of writing a grammar that supports the above (with the existing 
recognition 
code) ? 
As it seems unlikely, does anyone know of an open-source implementation of 
a 
grammar (e.g. JSGF) that would allow to do this ?  "
-- 
Vincent Ribiere
senior Engineer, Cisco Systems
(408) 527 6613
  




This page is maintained by Alan W Black (awb@cs.cmu.edu)
speechinfo.org is hosted on a machine donated by VA Linux Systems
VA Linux Systems