AEAP and Speech to text in the dialplan

Hello,

I’m exploring the possibility to send calls to an external speech to text service. I can send data from asterisk to a nodejs application (GitHub - asterisk/aeap-speech-to-text: Asterisk external speech to text application), and i can write the data to a wav file, to check i’m receiving the data, so this part is all right.

What i have a difficulty with is the diaplan part, the example provided is too simple.

Let’s say i want to transcribe an incoming call that goes to a queue, and then to an agent.

  • Do i have to call SpeechCreate, SpeechStart and SpeechBackground for each channel ?
  • Can i call them anywhere or only after the call is bridged ?
  • SpeechBackground seems to block the execution of the dialplan. Is it mandatory to call it for this to work? It seems it is the case.

Any help is much appreciated

Thank you

Those are really for dialplan IVR usage. It’s not for transcribing an active call. External media in ARI is better for real time, or doing it outside of Asterisk using post processing of a recording.

Thanks for your reply.

Those are really for dialplan IVR usage.

This probably should be mentionned in the documentation.

External media in ARI is better for real time

Do i need to give complete control of the call to the ari application? or can i send only the media while keeping the diaplan login? migrating all the dialplan logic to ari isn’t an option unfortunately.

or doing it outside of Asterisk using post processing of a recording

We already do that, the actual goal is to do the transcription in real time if possible

Thanks

You can use the snoop functionality of ARI to send a copy of the media to the ARI application, where it can then be sent out via external media. The channel being snooped on does not need to be in ARI.

Sorry i’m not very familiar with ari. Do i have to pass the control of the call to the ari application using Stasis? Or i just call directly the rest endpoint for snooping the channel

Thank you

Well, potentially both. You have to get the channel to the ARI application somehow - so you either do it outside of ARI, or call an ARI application using Stasis that does it. That’s up to you.

1 Like

OK thanks a lot. I’ll do some digging around.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.