[asterisk-dev] How to get a pointer to the ast_speech struct from a Channel struct

Javier Munoz javier.munoz at merlin.com
Thu May 5 13:59:40 CDT 2011


Thanks a lot Joshua,
    If I modify app_speech_utils that would mean that I'll have to
distribute my custom res_speech library along my connector, is that right?
    Do you know if there are any future plans from Digium to extend the
speech API to allow this kind of functionality?

Regards, Javier

On Thu, May 5, 2011 at 2:06 PM, Joshua Colp <jcolp at digium.com> wrote:

> ----- Original Message -----
> > Hello,
> > I'm new to this list so please forgive me if I break any nettiquete
> > rules on the maillist, I tried posting on asterisk-speech-rec list but
> > it seems it has been inactive for quite some time.
> >
> > I wrote an Asterisk Connector to a in-house ASR Engine that works
> > quite well. But to be able to tune up our recognition engine I added
> > the feature to my connector so we can record the input audio signal on
> > a temporary file.
> > I would like to add a dialplan function on my connector to retrieve
> > this filename to do aditional processing (for now logging request &
> > reponses into an external DB). My problem resides that I don't know
> > how to retrieve a pointer to the ast_speech structure from a Channel
> > structure.
> > I have tried invoking the find_speech helper function, but when I load
> > the connector into Asterisk I get the error: undefined symbol
> > `find_speech`.
> > My guess is that find_speech is not exported by res_speech.so but I
> > don't know how else to do it.
> > For now I have kinda 'solved' the problem by appending the filename
> > into the speech->results->text variable that I latter parse into the
> > real speech result text and the filename, but I think thats kinda
> > messy/hacky and I would like a clean implementation.
> > Have anyone found themselves on a similar situation? Any suggestions?
>
> You really can't. The way the speech structure is stored is for the
> app_speech_utils
> applications themselves, not for usage by other applications/dialplan
> functions. The only options
> you really have is to add your own dialplan function in app_speech_utils
> that then calls into
> your engine or to do as you are already doing.
>
> --
> Joshua Colp
> Digium, Inc. | Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at:  www.digium.com  & www.asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110505/09981a74/attachment.htm>


More information about the asterisk-dev mailing list