The Acoustic Spatial-Visualizer can generate spatial audio and visualize its moving track.
The spatializer can spatialize mono audio with continuous trajectory in 3D space given RIRs in different locations.
The visualizer uses APGD algorithm to takes in a 32-channel spatialized audio and outputs an energy map of azimuth and elevation every 100ms.
Run pip install -r requirements.txt
- Set up
path_to_irs
andIRS
inspatialization.py
- Set up paths to read and write audio files
- Run
python3 spatialization.py
- This script is based on the application of this repo.
- Download the submodule using
git clone https://github.com/adrianSRoman/DeepWaveTorch
- Set up current working directory to DeepWaveTorch in
visualization.py
- Set up
file_path
as the input audio file location and output folder in the end of the script - Set up
N_max_frames
as the number of frames to visualize (100ms per frame) - Run
python3 visualization.py
- Check out the images generated in the output map and generate .gif file of them using
convert -delay 20 -loop 0 $(ls -1 viz_output/*.jpg | sort -V) animated.gif