I made a VOIP program with pyaudio where we send/recive audio over TCP. The Server side recives audio and client sends audio, but i want to test the CPU usage and time delay, to compare TCP with UDP, and test diffrent buffer and sample rates.
Question: I want to find the latency/time delay when sending audio over socket with TCP. How can i do this? Also a code to find the CPU usage.