Usually the participant who sends the loudest audio stream is considered the 'active speaker'.
So you have to calculate the volume for each audio stream. How to measure the volume depends on the encoding of your audio stream. Check out this question on how to calculate the volume for PCM audio.