New Audio API [Beta]: Elevate Sound and Voice in Your Experiences

Hey @homermafia1, I tried making a small script and it seems to work on my end – one thing that might be surprising is that with Enum.AccessModifierType.Allow, a Player must belong to their own device’s UserIDAccessList in order to send audio up to the server – it’s not only a receiver-side access-control-list

Could you share sample code?

6 Likes

Hello,
I somehow missed the talking player in the list, now it works, thanks !

5 Likes

I saw that the setting to disable voice chat was moved to the Roblox menu (I'm no longer able to disable VC - #4 by letsgoroger), but it looks like it only shows on computer devices. Is that setting getting added to mobile devices anytime soon ? It is extremely annoying to have to mute everyone.

6 Likes

Is this meant to replace the current sound instance?

4 Likes

It probably is some time in the future. They’re most likely keeping the two at the moment for compatibility sake since ALL roblox games are made on the prior API.

4 Likes

Agreed, @ReallyLongArms, we do really need volumetric audio (basically, to have the emitters use the size of the part they’re connected to like the Sound object does). Without this, the system just doesn’t work well with large continuous sound sources (e.g. a fire).

2 Likes

Hey @Ed_Win5000 – volumetric emission is a bit tough to support in the new api, because we now allow arbitrarily many listeners to be hearing emitters simultaneously; each one might perceive different degrees of “width”. The volumetric emission implementation for Sounds assumed one listener in this regard; and even then, was only able to support simple shapes like spheres, blocks, and cylinders.

In the new API, there’s the option to use multiple emitters for one AudioPlayer – this is something we didn’t have for Sounds. So for something like a bonfire, you could scatter dozens or even hundreds of emitters (emitters are cheap) around the surface of the fire, to get a sense of wideness. That approach would work for any part shape, too, not just simple ones!

There’s also a new AudioChannelSplitter instance, which could be used to take apart the channels of a multichannel bonfire recording, and pan them around individually

4 Likes

LongArms you legend :sob:
Finally we get a channel splitter!! Thank you. I don’t know how I didn’t notice it until now. Is there a place where I can look at change logs?

5 Likes

Would you be able to provide an example of the example with the AudioChannelSplitter? I don’t think we have a panning instance in studio…

5 Likes

Hey @panzerv1; this was first mentioned in the 660 Release notes – there’s also a channel-mixer (combines several streams into one multichannel stream; i.e. the opposite of splitting) I commented an example showing how you can use that for stereo/left-right panning

We’re working on getting similar examples added to the docs page as well – note these aren’t fully live yet, but we should be flipping the flag in the next week or so

3 Likes

@ReallyLongArms, when can we get spectrum privileges for AudioDeviceInputs? I’ve been waiting a really long time… :pleading_face:

Hey, enabling voice chat api makes everyone be able to be heard very far away is there a way to fix this?

AudioEmitter | Documentation - Roblox Creator Hub

The example audio api example place file is unavailible?

I recently transitioned my emergency vehicle sirens over to the new audio API however I have noticed there isn’t a doppler effect to any of the new audio. I have done some digging around to find a solution that isn’t scripting and found nothing. So, I will ask here, will there be a doppler effect added to the Audio API or will I have to script my own?

Hey, enabling voice chat api makes everyone be able to be heard very far away is there a way to fix this?

Hey @m_rylandcrabcakes – before voice chat used the audio api, it was given a hardcoded distance-attenuation curve (green).

This curve is not a sensible default for most things – it means that voices become completely inaudible if they are more than 80 studs away from your listener.

When updating to use the Audio API, peoples’ voices are now emitted by AudioEmitters, which come with a default distance attenuation following the inverse square law (purple). This means that by default, AudioEmitters will be audible from further away than the old internal voice chat curve.

As @wallofgarlic points out, the distance attenuation can be changed using the SetDistanceAttenuation method; so if you want to change the attenuation back to what it was before, you can copy + paste this (local) script anywhere in your experience
UseOldVoiceCurves.lua

The example audio api example place file is unavailible?

Hey @Harisaiyo – the placefile isn’t public, but it should be downloadable by clicking on the “…” menu – from there, you can open it up in studio to check it out!

I recently transitioned my emergency vehicle sirens over to the new audio API however I have noticed there isn’t a doppler effect to any of the new audio. I have done some digging around to find a solution that isn’t scripting and found nothing. So, I will ask here, will there be a doppler effect added to the Audio API or will I have to script my own?

@LePenguia with Sound, doppler was implemented by internally changing the PlaybackSpeed depending on the relative positions between the sound and your listener. It’s tough to make that the default behavior for AudioEmitter, because one AudioPlayer might be emitted from multiple distinct AudioEmitters, traveling at different speeds, at different distances from your listener :grimacing:

If you know that only certain sounds need doppler, a simple approach might be to use AudioEcho with a nonzero RampTime, as described here

1 Like

Hey, thanks, but unable to download the file you sent. Will try to replicate this though with my own script andwill see if it works. Thanks

can’t figure out how to do this - will need your script

This is an amazing update! There are so many possibilities we can explore using sounds and voice chat from. I attempted to create a microphone system based on this API, using a free model from @steel_apples as a starting point to understand and implement it.

To enhance realism, we integrated the new API update for audio into the system. However, I encountered some issues, which I’ve outlined in the video below. I tried multiple troubleshooting methods but still couldn’t pinpoint the source of the problem.

If anyone can help, I’d really appreciate it! Feel free to ask for any details.

Thanks!

1 Like

Menu next to the title → Edit in Studio