Posted: Wed Nov 07, 2007 9:49 pm Post subject: [asterisk-speech-rec] How to enable N-Best decoding?
HI Stephen:
A few months ago you gave a good description on how to
use the N-Best feature in Lumenvox. I think I
understand the difference between ${SPEECH_TEXT(0/0)}
and ${SPEECH_TEXT(1/0)}. That was made clear from your
example with ($she | $sea | $he | $bee).
Unfortunately, I'm not sure I understand the
difference between ${SPEECH_TEXT(0/0)} and
${SPEECH_TEXT(0/1)}. Do you have an example you
could send illustrating the difference? Basically, I'm
not sure what you meant when you said:
Quote:
If there is more than one semantic interpretation,
you would check 0/1.
Also, the ${SPEECH(results)} variable is used to
determine the total number of N-Best results. Is there
an equivalent variable that can be used to check for
the number of "semantic interpretations"?
Kindly,
Adrian
--- Stephen Keller <StephenKeller@LumenVox.com> wrote:
Quote:
Scott (and anyone else interested in n-best),
I apologize for the delay in this response, but
we've been working with
Digium on troubleshooting some issues related to
n-best using the
LumenVox Speech Engine on Asterisk. It looks like we
have them all
straightened out, and the latest version of the
Asterisk-LumenVox
connector bridge is available on our FTP site (as
always drop me a line
off-list if you need the link).
To activate N-best, use
Set(SPEECH_RESULTS_TYPE()=nbest) after
SpeechCreate.
You can then check results like normal, except you
specify different
results using ${SPEECH_TEXT(X/Y)}, where X is the
number of the result
to check (starting at zero) and Y is the
interpretation.
So the first interpretation for the first n-best
result is 0/0; e.g.
${SPEECH_TEXT(0/0)}. If there is more than one
semantic interpretation,
you would check 0/1. The second n-best result would
be 1/0, etc.
Likewise you would use ${SPEECH_SCORE(X/Y)} in the
same fashion to check
confidence scores.
Here's a very basic dial plan and grammar that
should illustrate the
concepts. If you use the grammar and say a valid
choice, you will almost
certainly get back multiple n-best results, since
all the words are very
similar.
exten => 1,1,Answer
exten => 1,n,Wait(1)
exten => 1,n,SpeechCreate
exten => 1,n,Set(SPEECH_RESULTS_TYPE()=nbest)
exten => 1,n,SpeechActivateGrammar(test)
exten => 1,n,SpeechBackground(beep)
exten => 1,n,Verbose(1,Number of results:
${SPEECH(results)})
exten => 1,n,Verbose(1,First result is
${SPEECH_TEXT(0/0)} with a
confidence score of ${SPEECH_SCORE(0/0)})
exten => 1,n,Verbose(1,Second result is
${SPEECH_TEXT(1/0)} with a
confidence score of ${SPEECH_SCORE(1/0)})
Test grammar:
#ABNF 1.0 UTF-8;
language en-US;
mode voice;
tag-format <semantics/1.0>;
On
> Behalf Of Scott Stingel
> Sent: Monday, April 30, 2007 9:38 AM
> To: asterisk-speech-rec@lists.digium.com
> Subject: [asterisk-speech-rec] How to enable
N-Best decoding?
>
> Hello-
>
> I'm running the Lumenvox 7.5 engine, the Lumenvox
1.4 connector, and
> Asterisk 1.4.3. All is well, except that the
N-Best feature
> does not
> seem to work. As I understand it, this feature
allows the
> recogniser to return multiple possibilities for
the decoded
> recognition.
>
> What do I have to do to enable this? An excerpt
from the
> DecodeServerLog.txt file shows these interesting
lines before
> each decode. Perhaps the "NO_OOV" is important?
>
> 04/30/2007
>
Begin
> Core Decode Port
>
> Thanks for any help,
> Scott Stingel
>
> www.evtmedia.com
>
> _______________________________________________
> --Bandwidth and Colocation provided by
Easynews.com --
>
> asterisk-speech-rec mailing list
> To UNSUBSCRIBE or update options visit:
>
Posted: Wed Nov 07, 2007 10:34 pm Post subject: [asterisk-speech-rec] How to enable N-Best decoding?
Quote:
A few months ago you gave a good description on how to use
the N-Best feature in Lumenvox. I think I understand the
difference between ${SPEECH_TEXT(0/0)} and
${SPEECH_TEXT(1/0)}. That was made clear from your example
with ($she | $sea | $he | $bee).
Unfortunately, I'm not sure I understand the difference
between ${SPEECH_TEXT(0/0)} and
${SPEECH_TEXT(0/1)}. Do you have an example you
could send illustrating the difference? Basically, I'm not
sure what you meant when you said:
> If there is more than one semantic interpretation, you would check
> 0/1.
This happens when the same input can match multiple rules, giving the
Engine two or more valid parses of a grammar.
A common example is a call router where you just allow first name
matches, but have two people with the same first name:
root $name;
$billjones = bill [jones] {out = "bill jones"};
$billsmith = bill [smith] {out = "bill smith"};
If a caller just says "Bill" then you have two distinct parses, each
with a different semantic interpretation. In the first parse, the
interpretation is "bill jones" and in the second the interpretation is
"bill smith".
Quote:
Also, the ${SPEECH(results)} variable is used to determine
the total number of N-Best results. Is there an equivalent
variable that can be used to check for the number of
"semantic interpretations"?
I'm not sure. If one of the Digium folks could answer this, I would be
grateful.
Posted: Wed Nov 07, 2007 10:50 pm Post subject: [asterisk-speech-rec] How to enable N-Best decoding?
Quote:
> Also, the ${SPEECH(results)} variable is used to determine
> the total number of N-Best results. Is there an equivalent
> variable that can be used to check for the number of
> "semantic interpretations"?
I'm not sure. If one of the Digium folks could answer this, I would be
grateful.
That means me!
Currently it just counts the number of results in total as it was originally written pre-nbest times. I have now added it to my list to expand that a bit for nbest. (nbest results + semantic interpretations). If you need it *immediately* though it is not part of res_speech_lumenvox but part of app_speech_utils so anyone capable can add it. I'll reply to this thread though once I've done it.
Joshua Colp
Software Developer
Digium, Inc.
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum