record_audio_sample
Record microphone audio and measure RMS/dBFS levels to test USB microphones or verify speaker output through host capture, with optional WAV saving.
Instructions
Record audio from a microphone for duration_sec seconds and analyze the signal level (RMS/dBFS).
Great for verifying hardware audio output (speaker -> host mic) or testing a connected USB microphone.
Args: duration_sec: Recording duration in seconds (1 to 30, default 5.0). output_path: File path to save the .wav file (defaults to a temporary file). sample_rate: Sample rate in Hz (default 16000). channels: Number of channels (1 for mono, 2 for stereo). alsa_device: Optional ALSA device string (e.g. 'default', 'hw:0,0', 'plughw:1,0').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channels | No | ||
| alsa_device | No | ||
| output_path | No | ||
| sample_rate | No | ||
| duration_sec | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||