<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I started to test the integration of my speech recognizer but not
everything is going as expected....<br>
<br>
- Is ast_speech_engine->start supposed to be a synchronous function?<br>
exten => 1000,1,Answer()<br>
exten => 1000,n,SpeechCreate(Audimus)<br>
exten => 1000,n,SpeechActivateGrammar(digitos-unidades)<br>
exten => 1000,n,SpeechStart()<br>
exten => 1000,n,Background(hello-world)<br>
exten => 1000,n,SpeechDeactivateGrammar(digitos-unidades)<br>
exten => 1000,n,Goto(internal-${SPEECH_TEXT(0)})<br>
<br>
I have the above dialpan (copied from docs) and what is happening is:<br>
-- Executing [1000@phones:1] Answer("SIP/1000-0334ea70", "") in new
stack<br>
-- Executing [1000@phones:2] SpeechCreate("SIP/1000-0334ea70",
"Audimus") in new stack<br>
-- Executing [1000@phones:3]
SpeechActivateGrammar("SIP/1000-0334ea70", "digitos-unidades") in new
stack<br>
-- Executing [1000@phones:4] SpeechStart("SIP/1000-0334ea70", "")
in new stack<br>
-- Executing [1000@phones:5] BackGround("SIP/1000-0334ea70",
"hello-world") in new stack<br>
-- <SIP/1000-0334ea70> Playing 'hello-world' (language 'en')<br>
-- Executing [1000@phones:6] <b>SpeechDeactivateGrammar</b>("SIP/1000-0334ea70",
"digitos-unidades") in new stack<br>
<br>
There is no wait explicit wait for engine results and there's no call
to ast_speech_engine->write (no audio is being sent to the ASR).<br>
<br>
From the functions in ast_speech_engine which of them should be
synchronous?<br>
How is ast_speech->state affecting the Asterisk behavior? (if you
indicate me the source file, I can check it myself)<br>
What else should be done do to have audio streamed to my engine?<br>
<br>
Renato<br>
<br>
<br>
Joshua Colp wrote:
<blockquote
cite="mid:30395120.454721232386752893.JavaMail.root@jupiler.digium.com"
type="cite">
<pre wrap="">----- "Renato Cassaca" wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'm finishing the ASR integration and I have a few more questions
(hopefully, the last ones):
- ast_speech_engine->get(...): returns the next available result or
all pending available results?
</pre>
</blockquote>
<pre wrap=""><!---->
It returns a linked list of results sorted by score.
</pre>
<blockquote type="cite">
<pre wrap="">- ast_speech_engine->dtmf(...): what is the expected engine behavior?
- stop the recognition, ignoring the results that are being processed
(but not finalized yet)
- stop the recognition but produce all results that are being
processed (and can be finalized with the received audio)
</pre>
</blockquote>
<pre wrap=""><!---->
This callback is purely informational. You do not need to implement it.
</pre>
<blockquote type="cite">
<pre wrap="">- ast_speech_engine->list: it's managed by Asterisk, I don't have to
do nothing with it. Right?
</pre>
</blockquote>
<pre wrap=""><!---->
Right.
</pre>
<blockquote type="cite">
<pre wrap="">- ast_speech_engine->activate(...grammar...): the activated grammar is
exclusive or incremental?
That means, if the ASR has already an activated grammar, should the
new one be added to them or should all current ASR grammars be
replaced by the new one? The interpretation of this will influence the
implementation of deactivate...
</pre>
</blockquote>
<pre wrap=""><!---->
This depends on the engine itself... you can implement it whichever way you want. I would say have it so that you can have multiple grammars at once though. This is what people would probably expect.
</pre>
</blockquote>
</body>
</html>