I have been willing to develop an application which transmits real-time audio over a local network with the lowest latency possible in python.
So I ran into this program (the last UDP version) and I have been trying to tweak a few variables to achieve the lowest latency possible, which I guess can be pretty low in a localhost environment. However removing the 5 seconds wait time and reducing the CHUNK size down to 1024 still results in an audible latency.
Does the BUFF_SIZE and the sleep time of the server_socket.sendto() loop have to do with it?
Are they related to each other?
It seems that with a BUFF_SIZE lower than 4096 (which is approximately the latency that I experience) the client does not playback the stream.
Is it then related to the client's queue?
My MAIN QUESTION would be: how do you fine tune these parameters to achieve the lowest latency possible?
Thank you very much!