Expand description
FFT-based frequency analysis for recorded signals
This module provides functions to analyze recorded audio signals and extract:
- Frequency spectrum (magnitude in dBFS)
- Phase spectrum (compensated for latency)
- Latency estimation via cross-correlation
- Microphone compensation for calibrated measurements
- Standalone WAV buffer analysis (wav2csv functionality)
Structs§
- Analysis
Result - Result of FFT analysis
- Microphone
Compensation - Microphone compensation data (frequency response correction)
- WavAnalysis
Config - Configuration for standalone WAV buffer analysis
- WavAnalysis
Output - Result of standalone WAV buffer analysis
Functions§
- analyze_
recording - Analyze a recorded WAV file against a reference signal
- analyze_
wav_ buffer - Analyze a buffer of audio samples and return frequency response
- analyze_
wav_ file - Analyze a WAV file and return frequency response
- compute_
clarity_ broadband - Compute Clarity (C50, C80) from Impulse Response (Broadband) Returns (C50_dB, C80_dB)
- compute_
clarity_ spectrum - Compute Clarity spectrum (C50, C80) using octave band filtering Returns (C50_vec, C80_vec)
- compute_
group_ delay - Compute group delay from phase data Group delay = -d(phase)/d(frequency) / (2*pi)
- compute_
impulse_ response_ from_ fr - Compute impulse response from frequency response using approximated inverse FFT
- compute_
rt60_ broadband - Compute RT60 from Impulse Response (Broadband) Uses T20 (-5dB to -25dB) extrapolation
- compute_
rt60_ spectrum - Compute RT60 spectrum using octave band filtering
- compute_
spectrogram - Compute Spectrogram from Impulse Response
Returns (spectrogram_matrix_db, frequency_bins, time_bins)
window_sizesamples (e.g. 512),hop_sizesamples (e.g. 128). - read_
analysis_ csv - Read analysis results from CSV file
- smooth_
response_ f32 - Apply octave smoothing to frequency response data (f32 version)
- smooth_
response_ f64 - Apply octave smoothing to frequency response data (f64 version)
- write_
analysis_ csv - Write analysis results to CSV file with optional microphone compensation
- write_
wav_ analysis_ csv - Write WAV analysis result to CSV file