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

I made a quick demo to show you guys the capabilities with this new audio update,
I kinda forget to put it in here but here you guys go:

8 Likes

Will we be seeing an API for realtime generation of audio and/or something similar to EditableImage and EditableMesh for audio?

5 Likes

I don’t know if you know, but there’s a delay on when I talk on the mic and in game. Is it possible to make it so it doesn’t have delay? (Note: I think the right word might be latency in game.)

5 Likes

Does this / will this have any functionality with SoundGroups???

5 Likes

Is this live / usable in a live game?

3 Likes

Yup! Here’s a quote from the end of the original post:

4 Likes

It’s a huge step forward, but after playing around with it I have a few observations I’d like to share:

  1. AudioPlayers desperately need a volume property. A lot of my sounds are not equally loud and I would always solve this by modifying the Volume property of Sound. I kind of don’t understand why would I have to play around with equalizers or faders just to normalise the volume of my certain sounds - it probably would be easier to just modify it using software like Audacity, but that takes significantly more time than modifying a single property.
  2. AudioEmitters should definetly have a property to limit the attenuation in a simpler way than using equalizers and faders (it’s in the Release Notes already). AudioListeners could have a similar property for the range in which it can pick up the audio.
  3. Roblox’s built-in recorder doesn’t seem to pick up any audio delivered to the player’s AudioDeviceOutput (EnableDefaultVoice is off, am I supposed to direct the audio somewhere else too?).
  4. I’m experiencing quite frequent crashes in Studio playtests (“device removed”, mostly when alt-tabbing around) - unsure if that’s a known issue or not.

Otherwise, great work! It really does open up a lot of new possibilities related to audio.

5 Likes

oh yeah i also made a horror game a few months back on this. it was quick and honestly i just wanted to get it done toward the end lol

11 Likes

Bug: When setting VoiceChatService.UseAudioApi to Enabled, there are inconsistencies between Play Solo and (at the least) Team Test. When running Play Solo, an Audio Listener is not automatically added to the player’s character. However, in Team Test, an Audio Listener is added. This is vice-versa for the Audio Emitters, which is automatically added during Play Solo, but not during Team Test. This seems backwards to me, and I think is an inconsistency that should be addressed. One approach isn’t necessarily better than the other, just as long as what happens is consistent across all forms of play.

4 Likes

I seem to be having an issue with this, despite having my AudioDeviceInput hooked up to an emitter, it does not seem to actually emit, in fact based on the voice chat icon, it seems to not be picking up my mic at all. I tested the old voice chat system and it worked there, so it seems it’s something to do with the audio API that prevents my mic from being picked up. (It also seems the Active property of the input is stuck disabled, so perhaps that’s somewhat related)

Edit: Disregard, I am dumb.

Edit 2: Okay not entirely disregard, now it’s not picking up any audio from my mic, even when active.

3 Likes

Do you have the UseAudioAPI property enabled on VoiceChatService?

3 Likes

Having issues to where I can now hear myself speaking when using Voice Chat with the new Audio API. This seems pretty recent so I’m not sure what change was made

4 Likes

This is so cool! But I have one concern. If the player doesn’t have voice chat enabled can I still make some type of proximity chat?

7 Likes

If the “Muted” Property is toggled on for AudioDeviceInput, is Roblox voice chat moderation still actively hearing the mic even though nothing comes across in game? My assumption to this is yes, because the Recording Indicator is showing.

6 Likes

I think I might have misunderstood the post. I am curious to know why we need an in-world mic, when our devices already have mics. Thats how we can use voice chat in the first place. So wouldn’t it be better to code the voice output to be in another location as well as the humanoidRootPart (assuming the voice output is there). For example the player presses a button, then their voice can be heard nearby and from a part that has an audio emitter.
Any clarification on this will be greatly appreciated.

5 Likes

I need an option to opt-out of this feature in my games, here is why:

I was playing around with the beta in Studio and there seems to be a discrepancy between what I hear and the audio my friends hear from my screen-share.

I set up an AudioPlayer, AudioEmitter, AudioListener and AudioOutput and I was moving the AudioEmitter around the listener. I then started sharing my screen to my friends on Discord, and to my surprise, there is a discrepancy between what I hear and the audio my friends hear from the screen-share.

Depending on the AudioEmitter’s position relative to the AudioListener’s, the sound would get silenced or heavily dampened for people watching the screen-share, meanwhile I could still hear it perfectly well.

I have found that this happens when my computer’s current speakers have a “Spatial sound format” enabled in the Windows Sound Settings. If I select the “Off” option the screen-share discrepancy is fixed.

After testing I have found that this problem is present on screen-shares in Discord (App and Web) and Guilded.


Linked below is a video that demonstrates the problem.
“Source Audio” is what I hear, “Screen Share Audio” is what my friends watching the stream hear.

For context, the sound’s attenuation was set so that the audio would not lower in volume no matter the distance from the listener.

As you can hear, the Source audio is unaffected and is being streamed correctly.
Unfortunately for the person watching the screen-share, the audio falls off really quickly and exhibits strange behaviour as noted previously above.

I’m assuming this is a problem with Chromium not supporting the new spatial sound, and as such it may not be something ROBLOX themselves can fix. However, this will be a problem if these issues are still prevalent when ROBLOX fully rolls out the new spatial sound engine. That’s why, as stated at the start of this reply, I recommend having an option for developers to disable it if screen-sharing on certain apps still exhibit these problems.


If you’d like to test this out yourself, here is the place:
spacialsound.rbxl (53.0 KB)

As a reminder, to replicate this you need:

  • The Spatial Sound API Beta Feature Enabled
  • Your System Speaker “Spatial sound format” set to anything other than “Off”
5 Likes

Are you referencing Volumetric Audio inside Roblox studio? This sounds like an aggregate audio problem and not a Roblox issue. Windows has some crappy “enhancements” that it applies that can mess up how the audio is shared on common platforms.

3 Likes

Just watched the video in full again, thought it was initially just exporting in mono but no. I don’t think roblox is routing the volumetric audio to an isolated 1/2 mix. It’s either that or Discord / Guild’s screenshare audio software doesn’t have support for the output from Roblox. I’ve noticed this issue for sometime now in games with volumetric audio forced on. Very strange issue indeed.

4 Likes

You can disable volumetric audio entirely inside the SoundService Property

game.SoundService.VolumetricAudio.Enabled = False


Down here ^

3 Likes

I wonder if old sound system will be deprecated once the audio api rolls out of beta

5 Likes