Test voice chat in Studio

Hey guys. Anyone knows how to test voice chat in Studio? I can’t see the bubble above my head in Studio, but I’m able to see and use it in the same published experience. So, I assume there is no problem with my account itself.

Thanks in advance

7 Likes

Found a solution.

  1. Enable Voice in Communications part of Game Settings
  2. Under the Model tab, insert Service → VoiceChatService
  3. Enable Team Test by adding someone to the workspace (atleast that’s how I enabled it)
  4. Create a Team Test session

There is no overhead GUI to enable your mic with the new Roblox GUI. You have to go into the menu at the top left.
image
image
image
I also know that the AudioDeviceInput works because I connected it to an AudioAnalyzer and AudioEmitter.

However, there seems to be no AudioEmitter in the Character by default:

So you’d have to manually add that using a script or something. I could be wrong though. That may only be on your client. However, if you want you to hear yourself on your client, you’d need to add this.
LocalScript in StarterCharacterScripts:

local rs = game:GetService("RunService")
if rs:IsStudio() then
	local char = game:GetService("Players").LocalPlayer.Character
	wait(1)
	if char:FindFirstChild("Wire") or char:FindFirstChild("AudioEmitter") then print("AE Found"); return end
	local Wire = Instance.new("Wire")
	Wire.Parent = char
	local AE = Instance.new("AudioEmitter")
	AE.Parent = char
	Wire.SourceInstance = plr:WaitForChild("AudioDeviceInput")
	Wire.TargetInstance = AE
end

(^ not tested btw)
You could also just manually add it if you don’t want it to always be on. It’s pretty easy to add.

Roblox does still moderate voice on studio. Staff have said they’re working on fixing it. I just got suspended for 5 mins for swearing while testing it out :sob:

Credit for solution:

Be sure to heart his post if this helps!

2 Likes

Update: This seems to only make it work on the clientside
image

Thanks for referencing my post! :smile:


There’s 2 reasons why that only works on the client-side:

  1. The AudioEmitter is being created via a LocalScript, which means that the change does not replicate to other players. It would need to be created on the server for it to replicate and subsequently be heard by other players.

    • You can also turn on the VoiceChatService.EnableDefaultVoice property, which will automatically create an AudioEmitter in the Character model that is linked to that player’s AudioDeviceInput.

    • However, by default, this isn’t set up in a way where the player would be able to hear themselves as they speak. In order to achieve that, there are different options:

      1. If wanting to test out proximity voice chat in a solo playtest, you can turn on EnableDefaultVoice and then create a Script with its RunContext set to Client, which has the following code (*this was used in the Audio API Tutorial example place):
local listener = Instance.new("AudioListener", workspace.Camera)
local wire = Instance.new("Wire", listener)
local out = Instance.new("AudioDeviceOutput", wire)

wire.SourceInstance = listener
wire.TargetInstance = out

*It’s been a while since I last experimented with proximity voice chat but I had thought that this wouldn’t work for playing back your own microphone audio unless the AudioInteractionGroup was specified to be the same for both the AudioEmitter and AudioListener and not just left at the default, but I guess I was mistaken (unless that’s unintended behavior, because someone recently mentioned in the Audio API announcement thread that this behavior recently started to happen out of nowhere).

  1. If you want to playback your own audio directly to the Output without needing the in-game camera to be in close proximity to the AudioEmitter, you can route the AudioDeviceInput directly to the AudioDeviceOutput without needing to use AudioEmitters and AudioListeners.
-- Server Script
local Players = game:GetService("Players")


local function connectWires(source, destination)
	local wire = Instance.new("Wire")
	wire.SourceInstance = source
	wire.TargetInstance = destination
	wire.Parent = destination
end

local function onPlayerAdded(player)
	local audioDeviceInput = Instance.new("AudioDeviceInput")
	audioDeviceInput.Name = "AudioDeviceInput_Testing!"
	audioDeviceInput.Player = player
	audioDeviceInput.Parent = player
	
	local audioDeviceOutput = Instance.new("AudioDeviceOutput")
	audioDeviceOutput.Name = "AudioDeviceOutput_Testing!"
	audioDeviceOutput.Player = player
	audioDeviceOutput.Parent = player
	
	connectWires(audioDeviceInput, audioDeviceOutput)
end

for _, player in Players:GetPlayers() do
	task.spawn(onPlayerAdded, player)
end
Players.PlayerAdded:Connect(onPlayerAdded)


  1. In the case where you’re running a “Local Server” playtest with 2 or more clients, Voice Chat audio is currently not transmitted between the clients. As a result, to test Voice Chat between two separate player instances, you would need to use two separate accounts.

If you don’t want to run a Team Test in order to test out voice chat on your own, you can manually enable the AudioDeviceInput.Active property in solo playtests with the following steps:


Note that some of this may be subject to change, as the Audio API is still in beta!

2 Likes

The problem I have now is that, even though I have EnableDefaultVoice turned on, my voice doesn’t seem to be able to be captured by AudioListeners on the server side.

1 Like

Where is the AudioListener placed in the game?

Is the AudioListener.AudioInteractionGroup property set to a custom value or is it unchanged and kept at the default value?

Also, what is the AudioListener being routed to (an AudioAnalyzer, AudioDeviceOutput, etc.)?

1 Like

The AudioListener is in the workspace in a part labeled “Microphone”. It runs through a wire, leading to an AudioAnalyzer so that I can tell if the server registers the voice atleast and then runs through another wire to an AudioEmitter, located in a speaker part.
AudioListener → AudioAnalyzer → AudioEmitter → AudioListener in the Camera → AudioDeviceOutput

The AudioInteractionGroup property was different but I just set it to be the same and it still doesn’t work.

image

Sorry for the late reply, I had a lot going on.

1 Like

The AudioAnalyzer doesn’t have an Output, meaning that if you set it as the SourceInstance for the Wire, it won’t let you assign a TargetInstance.

This means that in order to recreate that setup in a way that would work, you would need to have 2 separate Wires for the initial AudioListener:

  1. One that goes to the AudioAnalyzer
  2. Another one that goes to the AudioEmitter then goes through subsequent Wires to the AudioListener in the Camera, and finally the AudioDeviceOutput.

Is your goal to make sure that the AudioEmitter in the “Speaker” won’t emit any sound unless it’s hearing Voice Chat audio from a player?