Realtime audio playback

Hi im working on an ai assisted voip system so it would listen to the users and then generates the response and then plays it back to them without disturbing the call i have tried ami with python and i want to get it done in the same language how is it possible?
It would be awsome of you if you could provide me some codes or some guidance.

Thanks alot.

There is at a minimum a weekly topic about this at this point. I’d suggest searching through the forum for the previous posts on the topic to see what people are doing and how, and then if you have specific questions asking them.