AudioAnalyzer:GetSpectrum always returns an empty array for AudioDeviceInput instances

Right now AudioAnalyzer:GetSpectrum always returns an empty array when analyzing AudioDeviceInput instances. The first reported instance of this issue was yesterday.

Here’s a video of a plugin that visualizes information returned by an AudioAnalyzer:

As you can see, for the AudioDeviceInput instance that’s being analyzed, nothing is being returned for the spectrum even though its PeakLevel property is being updated.

2 Likes

Edit: Just noticed you said this was fine until yesterday, apologies.

Old post:
AFAIK it’s been temporarily disabled since Feb 2024? Discussed here - they’ve yet to update the topic to confirm it’s live again, so I would imagine that still means it’s disabled?

1 Like

Hey @YasuYoshida
Thanks for being such a good supporter; we’ve chatted on Guilded.

Can you clarify the statement “The first reported instance of this issue was yesterday.”

When did you last observe that it worked? We did indicate in the post that we are working on this instance.

To clarify, I was referring to the first time I’ve heard someone talk about AudioAnalyzer:GetSpectrum giving an empty array when analyzing an AudioDeviceInput instance.

I’m almost positive that I’ve seen it work in the past when I was working on my audio plugin. The last time I analyzed an AudioDeviceInput was probably around the time the new audio api announcement was made. That would have been a few months ago at this point. I assumed that post about AudioAnalyzer:GetSpectrum being disabled wasn’t relevant anymore since it was from two months ago and because GetSpectrum works on other instances at the moment.

That would have been a few months ago at this point. I assumed that post about AudioAnalyzer:GetSpectrum being disabled wasn’t relevant anymore since it was from two months ago and because GetSpectrum works on other instances at the moment.

That’s unfortunately not the case… The Audio API is still in beta and features can come and go for a variety of reasons. A more formal announcement will come soon.

1 Like

Can confirm aswell with my voice tweaking project. AudioAnalyzer works perfectly with my FFT visualizer.

For me, GetSpectrum will return a table once upon the first buffer, but after that it’s empty. PeakLevel and RmsLevel both work however.

@therealmotorbikematt This is happening to all of us too.

Understood, that is the expected behavior for the time being as the Audio API is still in Beta.

We will be updating the documentation and more in the next few days.

2 Likes