Voicechat and AudioInputDevices sending nothing in-game

  1. What do you want to achieve?
    I just want to wire an AudioInputDevice into an AudioAnalyzer to process that data.

  2. What is the issue?
    No audio is coming in through voicechat or anywhere. The little microphone icon doesn’t even go up when I talk. The AudioAnalyzer is also detecting nothing.

image

  1. What solutions have you tried so far?
    I have tried making voicechat work through this script:
local plrs = game:GetService('Players')
local rs = game:GetService('RunService')

plrs.PlayerAdded:Connect(function(plr)
	if rs:IsStudio() then
		local input: AudioDeviceInput = plr:WaitForChild('AudioDeviceInput')
		if input then
			input.AccessType = Enum.AccessModifierType.Allow
			print('Force opened voice chat for ' .. plr.Name)
		end
	else
		script:Destroy()
	end
end)

To no avail as I still cannot do anything related to audio input.
Any help is appreciated.

1 Like

You set it to Allow but didn’t create an allow list
Use AudioDeviceInput:SetUserIdAccessList(user_ids) where it takes in a list of user ids