[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:29:15 CDT 2011


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?


Kind Regards, Javier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110505/5ae79e54/attachment-0001.htm>


More information about the asterisk-dev mailing list