[Freeswitch-users] Getting call audio stream from a java application
Thomas, Tom
tthomas at soleocommunications.com
Fri Mar 10 00:39:10 MSK 2017
Hello Guys,
I know your time is valuable, but I am using this mailing list as my last resort. I have tried to look for answers everywhere else, including the Confluence, wiki and google, and previous posts on the mailing list.
So here's my dilemma. I have a custom speech recognition engine which I want to use with freeswitch. I am not looking to use the built-in pocketsphinx module or using an mrcp server. What I am doing right now is, when a call is answered, I am recording it to a file using record_session. I have a java application that reads from this file and sends data to my speech engine. This would have been sufficient, if not for the fact that freeswitch writes 4 second chunks of audio at a time. I verified this by writing a small test. The recorded file is updated every 4 seconds with the previous 4 seconds of audio. This is not an acceptable delay for my particular application.
So I tried looking into other options where I can directly access the call audio. I know mod_shout can be used to setup an icecast stream, but that's not really what I would like to do. Same for the telecast feature, as I would like to use the raw audio stream instead of transcoded audio. I read in one post on stackoverflow that it is possible to use eavesdropping to listen to the audio stream. But it didn't go into any further details on how this can be achieved through an external application, like Java. Looking up examples for eavesdropping on freeswitch didn't help either.
So I'd like to know, if it's possible to directly access the audio stream from, say a Java program using the freeswitch library? If not, how does pocketsphinx and other built in speech engines really read in the audio? Also, if direct access is not possible, is there any way to change the recording write speed?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170309/0dfb5006/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list