LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[BUG]: IsSpeaking is Always False

Open tayjay opened this issue 1 year ago • 2 comments

Before You Report

  • [x] I have searched for existing reports of this bug, and this bug report is unique.

Version

1.1.1

Description

I've come across an issue with one of my plugins. It seems when calling on player.IsSpeaking it is always false. Happens on all Player Roles. Have also checked it on continuous loop and it never becomes true when the player is speaking.

Base variable player.VoiceModule.IsSpeaking is also false. VoiceModule is not null.

To Reproduce

public void OnSendingVoiceMessage(PlayerSendingVoiceMessageEventArgs ev)
{
    Logger.Debug("Player is speaking: " + ev.Player.IsSpeaking);
}

Output Seen: [DEBUG] [PluginName] Player is speaking: False

Expected Behavior

Expected Output: [DEBUG] [PluginName] Player is speaking: True

Additional Information

Have tested on Windows 11 and Ubuntu 20.04. Tested with no other plugins installed.

tayjay avatar Aug 25 '25 16:08 tayjay

Run in OnPlayerReceivingVoiceMessage and check if ev.Sender.IsSpeaking OnPlayerSendingVoiceMessage happens before the message is sent, so it makes sense that it doesn't register that they're speaking But maybe I'm wrong

CasualVideoGameEnjoyer avatar Aug 27 '25 02:08 CasualVideoGameEnjoyer

I'll check from there as well when I get the time. I also had a check on IsSpeaking running in a Coroutine which never saw it turn true. And I would have expected IsSpeaking to be true for the full duration of speaking as "OnPlayerSendingVoiceMessage" is called on every message packet.

tayjay avatar Aug 28 '25 21:08 tayjay