[asterisk-dev] Audio to/from Asterisk
sylvain at wazo.io
Fri Jan 25 09:14:56 CST 2019
On 2018-10-16 3:18 p.m., Sylvain Boily wrote:
> On 2018-10-15 3:29 p.m., Matt Fredrickson wrote:
>> On Tue, Oct 9, 2018 at 12:09 PM Seán C. McCord <ulexus at gmail.com> wrote:
>>> Because several people raised the issue at DevCon, I figured it may
>>> be worth mentioning this: app_audiosocket. I haven't submitted it
>>> mainly due to the thought that no one else would fine it
>>> interesting. There exist other, similar ways to get audio out:
>>> app_jack, app_unimrcp, etc. I built this because of some special
>>> needs, and it is very convenient due to its extremely light weight.
>>> Regardless, should anyone be interested, here it is:
>>> The idea is to create a TCP socket to somewhere, pass some extremely
>>> simple metadata (a UUID), and broker audio between the channel and
>>> the socket. It is as simple as possible.
>> For those who aren't aware, getting this pushed out to the -dev list
>> was an AstriDevCon 2018 takeaway action item with regards to interop
>> with web-based speech recognition APIs. I'd love to see more
>> discussion and work on this topic, as I think that there stands much
>> to be improved in Asterisk to better interoperate with some of the
>> major speech recognition vendors.
> Will be nice to have this on ARI, like GET /channels/channelId/stream.
> We can help to develop this feature!
We did a 3 days Wazo hackathon this week and we developed a module to
get audio from a channel_id to a websocket in asterisk.
Our project has been to get a realtime voice communication, send it to
an STT and with the result to prioritize a call in a mini emergency call
center before someone get the call. The source code of this project is
on my github. 
It works well but it's a proof of concept (no test). I will be nice to
have input, tests and other suggestions to put it on Asterisk in the
future. Actually, the concept is you open a websocket with a subprotocol
channel-stream and a Channel-ID http header with the channel_id of the
channel you want to have the stream. The module use audiohook in
Asterisk, transcode and send it in PCM 16k to the websocket.
We will also release all source code for this demonstration if someone
want to test. In attachment a screenshot to help you to understand the
result. (in french sorry)
Thank you for your feedback or suggestions.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 128200 bytes
Desc: not available
More information about the asterisk-dev