I am trying to build a software that records audio to a server and then broadcasts that audio into the same room that the microphone is present. This means that the audio signal is uploaded to the server and travelling back again. This adds a variable delay in its playback.
So far what I've experienced is the recorded audio is then picked up again by the microphone and played back over the speakers. This is, of course, much less than desired.
Given that I will not know very easily the delay in time that it will take for the audio to start playing from the speakers (may be even seconds afterwards), how can I eliminate audio being broadcasted to then be recorded again by the microphone?