<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I'm finishing the ASR integration and I have a few more questions
(hopefully, the last ones):<br>
&nbsp;- ast_speech_engine-&gt;get(...): returns the next available result or
all pending available results?<br>
<br>
&nbsp;- ast_speech_engine-&gt;dtmf(...): what is the expected engine
behavior? <br>
&nbsp;&nbsp;&nbsp; - stop the recognition, ignoring the results that are being
processed (but not finalized yet)<br>
&nbsp;&nbsp;&nbsp; - stop the recognition but produce all results that are being
processed (and can be finalized with the received audio)<br>
<br>
- ast_speech_engine-&gt;list: it's managed by Asterisk, I don't have to
do nothing with it. Right?<br>
<br>
- ast_speech_engine-&gt;activate(...grammar...): the activated grammar
is exclusive or incremental? <br>
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...<br>
<br>
Thanks!<br>
<br>
Joshua Colp wrote:
<blockquote
 cite="mid:708249.426591232164263758.JavaMail.root@jupiler.digium.com"
 type="cite">
  <pre wrap="">----- "Renato Cassaca" <a class="moz-txt-link-rfc2396E" href="mailto:renato.cassaca@voiceinteraction.pt">&lt;renato.cassaca@voiceinteraction.pt&gt;</a> wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Thanks Joshua for your quick answer, it helped me to keep on
developing. Now I have some calls of Asterisk forwarded to my engine.
Even though some some quick questions arose:

- If a call to "speech_engine_create" fails (returns a value different
from 0) will "speech_engine_destroy" be called to the same ast_speech?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
No, it will not be.

  </pre>
  <blockquote type="cite">
    <pre wrap="">- In ast_speech structure who is responsible to initialize the lock
and when should it be acquired/release? What is protected by this
lock?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The ast_speech structure is initialized by res_speech. The only thing you need to initialize is your engine itself. The lock protects the contents of the structure.

  </pre>
  <blockquote type="cite">
    <pre wrap="">- In ast_speech structure there is a "data" field... What is it for? I
thought that audio will be delivered to the engine here, but then I
saw that the write function (in ast_speech_engine) already has an
argument to that intent...
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The field is for data that is unique to your engine. If it has to keep its own structure with current state information, buffers, whatever, it can associate that to the speech session using the data field and then get to it in the various speech callbacks.

  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
Renato Cassaca<br>
VoiceInteraction - Tecnologias de Processamento da Fala, SA<br>
<a href="maito:Renato.Cassaca@voiceinteraction.pt">Renato.Cassaca@voiceinteraction.pt</a><br>
<a href="http://www.voiceinteraction.pt">http://www.voiceinteraction.pt</a><br>
Rua Alves Redol 9, 1000-029 Lisboa, Portugal<br>
Telefone: +351 213100206 Fax: +351 213145843<br>
</div>
</body>
</html>