Re: Stream audio to Speech to Text engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 24.06.20 13:38, Mišo Belica wrote:
> Thanks Andreas,
>
> the Python bindings have the same API as the PJSUA2 C++ library. But
> still the C API is even more low level so maybe I will need to use it
> instead of the Python :(
>
> You described it correctly. My APP receives the call, negotiates via
> SDP and then should redirect the incoming RTP stream to STT engine.
> After the call end, the app should close the RTP stream in the STT
> engine and that all.
>
> I checked the resources for you and I think you are right that
> modification of the SDP is not a good idea. Also, after reading the
> resources and references I found this
> https://trac.pjsip.org/repos/wiki/FAQ#audio-man. Still I think it's
> overkill to implement new port to just pass the traffic to another
> app. I would like to somehow hook into the PJSUA2 initialization and
> instead of creating new RTP socket in PJSUA2, I want to simply create
> it in the STT engine and provide opened port to PJSUA2 instead. This
> RTP stream will be redirected and PJSUA2 don't need to know about it.
>
> The steps you provided helped me understand the PJSIP in more detail,
> but unfortunately I still don't understand what do you suggest.
> Creating the streams and registering them to conf. bridge is done
> automatically in PJSUA2 and I am not sure if you suggest to create
> extra stream for RTP and conf. bridge will be kind of proxy were RTP
> will go from one stream to another. Do I understand it correctly or is
> it something else?
>
> Thanks in advance for the clarification and have a nice day :)

Hey there,

you're right, implementing a new media port would be overkill in this
case, because the functionality you need is already implemented in
another way.
I'll try to summarize what would be my solution, to give you an idea how
it's supposed to work:

1. Create new RTP stream on a specific (UDP) port and set remote
endpoint to your STT engine
2. Setup STT so that it streams RTP to your local port
3. Add the newly created RTP stream to the conference bridge
4. When a call comes in and is established,
    use pjsua_conf_connect( conf_slot_of_call, conf_slot_of_stt_stream );
    and pjsua_conf_connect( conf_slot_of_stt_stream, conf_slot_of_call );
    to interconnect the audio streams.
5. The rest should be handled by your STT I guess

All the best,
Andreas


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux