I’m trying to use the new AudioAPI to detect when a player is talking via voicechat, I already enabled “UseAudioApi” option on the VoiceChatService and I tried this piece of code
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local AudioAnalyzer = Instance.new("AudioAnalyzer")
AudioAnalyzer.Parent = Character
local AudioListener = Instance.new("AudioListener")
local Attachment = Instance.new("Attachment",Character.HumanoidRootPart)
AudioListener.Parent = Attachment
Character:WaitForChild("AudioEmitter").AudioInteractionGroup = "2B"
AudioListener.AudioInteractionGroup = "2B"
local Wire = Instance.new("Wire")
Wire.Parent = Character
Wire.SourceInstance = AudioListener
Wire.TargetInstance = AudioAnalyzer
while wait() do
if AudioAnalyzer.RmsLevel > 0 then
print("VOICE DETECTED")
end
end
end)
end)
however I can’t seem to get any prints in the console (the script is located in ServerScriptService)
I don’t think roblox has made it possible yet to detect player voice, but I’m not updated that much with the announcements and what not so I might be wrong:
Sorry isn’t enough arctic fox, its time to go back to antartica.
How did you guys even adapt to the climate of antartica, and then adapt to using devices like keyboards to use the devforum?! Your species is astonishing…
it’s checking if success == false, but then you add and if even though you’ve already checked if it were false, you’re checking for the same thing twice, which just makes your code look unprofessional.