How to get data from microphone

Godot Version

4.3

Question

For my project, I need to access the user’s microphone and return the volume. I thought this would do the trick, but turns out that audioStreamMicrophone has like zero methods.

extends Node
class_name AudioManager

@onready var input_stream = AudioStreamMicrophone.new()
var volume: int

func _ready() → void:
pass

func _process(delta: float) → void:
if input_stream.is_playing():
var mic_data = input_stream.get_data()
var vol = get_volume(mic_data)
print(vol)
volume = vol

does anyone know how to get the volume as a float from the user’s microphone in 4.3?

Here’s a demo on how to record the microphone godot-demo-projects/audio/mic_record at master · godotengine/godot-demo-projects · GitHub

I don’t want to record any data. I’m just trying to find the volume of the user’s mic. I’ll go through the project you linked and see if there’s anything applicable