Closed ahmed-troido closed 3 weeks ago
You could create a memplayer and supply the buffer yourself or you could create your own media port, insert it into the confbridge and then connect it to the call. The confbridge will then repeatedly call into your media port to get frames.
Thanks for your help
Could you please provide me with some resources or documentation about both ways (specially the memplayer
)?
Sure, take a look at the PJ docs here:
Thanks but I tried to search the whole documentation to find a sample that using memplayer
but I didn't find one.
also I tried to call this but there is no fun called pjmedia_mem_player_create
in pj
pj.pjmedia_mem_player_create()
I'm using python 3.9
Ah sorry I didn't notice it was Python. I'm not sure these "low level" functions are exported to Python... I don't really have any experience in using pj from Python though; If there are no exports of these functions you might need to write and export them yourself I'm afraid.
Thanks again :pray: but Do you have any resources or what I need to do (steps) to use this in python ?
Not really no, sorry.
Describe the feature
I'm using this snippet of code to playback a wav file to the caller using pjsua2
AudioMediaPlayer
How to send a chunk by chunk (audio frames) to the caller instead of playing a wav file ?
I need a way to send chunks instead of playing a WAV
Describe alternatives you've considered
No response
Additional context
No response