I'm trying to make a webrtc application and I need to know when the user is talking so I can show other users that I'm talking. For capturing the microphone I use this code:
localStream = await navigator.mediaDevices.getUserMedia({ video: false, audio: true })
And I send the localStream to other users using peerjs. I have the stream. I need a way of detecting when the user is talking.