Standalone C++ DOA and MVDR
This directory contains a dependency-free C++17 implementation of SRP-PHAT
(the historical SRP-PATH spelling is accepted as an alias), NormMUSIC, and
frequency-domain MVDR. It includes its own radix-2 FFT, complex Hermitian
Jacobi eigensolver, and Gaussian elimination. The resulting binary does not
require Eigen, FFTW, BLAS, Python, or Pyroomacoustics at runtime.
Build from the repository root:
cmake -S . -B build
cmake --build build --config Release
The CLI input format is a whitespace-separated matrix. The first line is
<sample_count> <channel_count>, followed by one row per sample:
build\cpp\Release\doa_cli.exe srp input.txt 48000 512
build\cpp\Release\doa_cli.exe normmusic input.txt 48000 512
build\cpp\Release\doa_cli.exe mvdr input.txt 73 48000 512 > output.txt
compare_with_pyroomacoustics.py generates a deterministic plane wave and
compares both DOA angles and MVDR samples against the repository's Python
reference. Run it after building with:
uv run python cpp/compare_with_pyroomacoustics.py
The implementation uses the same microphone coordinates, Hann window,
frequency-bin convention (500 <= f < 4000 Hz), steering-vector sign,
frequency-normalized NormMUSIC spectrum, diagonal loading, and overlap-add
normalization as the Python path.