How can I measure speaking duration for users in my Discord debate server?

Hey everyone! I’m trying to set up a system for our Discord debate club. We need to keep tabs on how long each person talks during our sessions. I’ve looked into the Discord API but I’m a bit lost.

I can see when someone’s mic is on, but that doesn’t tell me if they’re actually talking. Is there a way to detect actual speech time for each user?

I came across something called guildMemberSpeaking, but it seems outdated. Has anyone figured out a workaround or a different approach?

Any tips or suggestions would be super helpful! I’m not a coding expert, so simple explanations are much appreciated. Thanks in advance!

hey there! have u considered using a simple bot that tracks when someone unmutes? it’s not perfect, but it could give u a rough idea of speaking time. maybe combine it with a command system where ppl type !talking when they start speaking? just brainstorming here, hope it helps!

I’ve faced similar challenges with speech tracking in Discord. One approach that worked for me was using a bot to monitor voice activity. While it’s not perfect, you can set a threshold for continuous voice activity to count as ‘speaking time’. This method avoids the complexity of audio analysis.

Another option is to implement a manual system where debaters use commands like !start and !stop to mark their speaking turns. This puts more responsibility on the users but gives you precise timing data.

Remember to clearly communicate any tracking methods to your members and ensure you’re complying with Discord’s policies. Good luck with your debate club setup!

As someone who’s worked on similar projects, I can tell you that measuring actual speech time on Discord can be tricky. The API doesn’t provide a straightforward way to detect when someone is actually speaking versus just having their mic on.

One workaround I’ve used is to combine the voice state updates with audio analysis. You can use a bot to capture the audio stream and then use a library like pyAudioAnalysis to detect speech segments. It’s not perfect, but it gives a decent approximation of speaking time.

Another approach is to implement a push-to-talk system for debates. That way, you’ll more accurately gauge when someone intends to speak. This method requires a bit more user cooperation but is technically simpler to handle.

Always ensure that any solution adheres to Discord’s privacy policies and terms of service, and be clear with your server members about what data you’re collecting.