<!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">
Thanks Joshua for your quick answer, it helped me to keep on
developing. Now I have some calls of Asterisk forwarded to my engine.<br>
Even though some some quick questions arose:<br>
<br>
- 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?<br>
<br>
- In ast_speech structure who is responsible to initialize the lock and
when should it be acquired/release? What is protected by this lock?<br>
<br>
- 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...<br>
<br>
Renato<br>
<br>
Joshua Colp wrote:
<blockquote
cite="mid:21795205.399211232115131337.JavaMail.root@jupiler.digium.com"
type="cite">
<pre wrap="">----- "Renato Cassaca" <a class="moz-txt-link-rfc2396E" href="mailto:renato.cassaca@voiceinteraction.pt"><renato.cassaca@voiceinteraction.pt></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'm trying to integrate a new speech engine in Asterisk using Speech
Recognition API. I followed the available documentation and
implemented
all entry points. In modules.conf I've added a preload line with the
name of the generated .so.
After doing this when asterisk was staring I got the message:
loader.c: Module ASR did not register itself during load
Then I found that I had to add some more interfaces implementation in
my
ASR module (module.h). So, in the of my source file I've pasted:
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS.....
But I'm not really sure what I have to do in the "load" callback....
Do
I have to add an ast_speech_engine in engines list defined at
res_speech.c?
</pre>
</blockquote>
<pre wrap=""><!---->
In the load callback you have to register your speech engine using the ast_speech_register function and in the unload callback you have to unregister it using the ast_speech_unregister function.
</pre>
</blockquote>
<br>
<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>