Help with VoiceChatService

Hey devs! I am currently trying to figure out how to manually control player’s voice chat.

The goal: two players who are not near each other can hear and speak to each other

This is the documentation on VoiceChatService: VoiceChatService | Documentation - Roblox Creator Hub

Under “UseAudioApi” it states:

" If Enabled, the voice chat setup is represented and controlled by AudioDeviceInput objects. More specifically:

If Disabled, the voice chat setup is done through an internal-only system.

Currently, setting this to Automatic has the same meaning as Disabled. However, in the future, Automatic will become Enabled, so that new experiences can achieve greater customization over voice."

Is it possible to manually set up an AudioDeviceInput, AudioEmitter, and AudioListener as stated above, but in places other than the player’s character? And if so, how?

With or without the default setup being created, you can manage and link any of the instances pretty freely. The parent of a listener is where audio is heard from, and the parent of an emitter is where audio is emitted from. You need to create wires to connect them, which you probably already know. You mentioned a goal:

You can create a wire for another player’s AudioDeviceInput that targets the current player’s AudioDeviceOutput. That’ll directly play voice chat without any distance attenuation. You might want to cut off the character’s emitter or this wire when close so the audio isn’t doubled up.

1 Like

Thank you. Do you have any documentation/videos/examples to help me out with this?

There’s an update topic that provides an example place file and a link to an uncopylocked place that works with a couple of the instances together. I think the handheld radio example gets pretty close to the goal. As for documentation, the Wire API page shows all the instances and most of their individual pages have examples and explanations on what their properties do. I’m here if you need more help.

1 Like

Really appreciate it. I’ll reach out if I need more help!

I know you might not need this, but this was my solution to a topic that (from my understanding) was similar to yours. Perhaps it might be useful for someone if they find this, considering the forum search is pretty bad.

1 Like