Source code for "Development of a Microphone Array Room Impulse Response Dataset for Evaluating Multichannel Acoustic Generation (多チャンネル音響生成を評価するためのマイクロフォンアレイ室内インパルス応答データセットの構築)".
This source code is based on Learning Neural Acoustic Fields.
Neural acoustic fields learn from a Room Impulse Response (RIR) dataset and can estimate RIR at arbitrary positions. We extended Neural Acoustic Fields to be able to learn from multichannel RIRs.
Additionally, we made it possible to construct datasets through Pyroomacoustics simulations and evaluate multichannel RIR estimation based on the accuracy of Direction of Arrival (DoA), i.e., sound source direction estimation.
The source code in this repository has been verified to work on Google Colaboratory.
- Pytorch 1.9 (1.10 should work as well)
- Pyroomacoustics 0.7.3
- h5py
model: Extended NAF networkmodel_pipeline: Train, test, and evaluation of the networkpreprocess: Preprocessing the RIR dataset for the networksimulation: Pyroomacoustics simulation for creating dataset
- Creating a simulation RIR dataset using Pyroomacoustics
-
python ./simulation/simulation.py
./simulation/simulation.pyMultiChannel_RIR_Generation/simulation/simulation.py
Lines 14 to 39 in 31c7077
-
- Downloading the real RIR dataset from Google Drive
-
gdown https://drive.google.com/uc?id=1ed4MeDcsWhquXO_a3mNQCJ5i21TR8JpQ unzip real_wav_data.zip
-
- Splitting the dataset into training and test dataset
-
python ./preprocess/make_train_test_split.py
-
- Preprocessing the RIR waveform data to match the format of the network output (e.g., by converting it into spectrograms)
-
python ./preprocess/make_data.py
-
- Training the network
For more details on options, refer to./model_pipeline/options.py.
The trained model will be saved in the directory specified bysave_locandexp_nameoptions.-
python ./model_pipeline/train/train.py --exp_name sim_data_exp --epochs 300 --phase_alpha 3.0 --dir_ch 4
-
- Performing inference on the test data
The options must be the same as those used in training.
The inference output will be saved in the directory specified by the--save_locand--inference_locoptions.-
python ./model_pipeline/test/test.py --exp_name sim_data_exp --epochs 300 --phase_alpha 3.0 --dir_ch 4
-
- Perform inference on the train data
-
python ./model_pipeline/test/test_train_data.py --exp_name sim_data_exp --epochs 300 --phase_alpha 3.0 --dir_ch 4
-
- Computing the spectral loss from the inference results on the test data
The options must be the same as those used in training.
The results will be printed to the standard output.-
python ./model_pipeline/evaluation/compute_spectral_loss.py --exp_name sim_data_exp --epochs 300 --phase_alpha 3.0 --dir_ch 4
-
- Computing the T60-error from the inference results on the test data
The options must be the same as those used in training.
The results will be printed to the standard output.-
python ./model_pipeline/evaluation/compute_T60_err.py --exp_name sim_data_exp --epochs 300 --phase_alpha 3.0 --dir_ch 4
-
- Computing the DoA error from the inference results on the test data
Do not specify the options.
The results will be printed to the standard output.-
python ./model_pipeline/evaluation/compute_DoA_err.py
./model_pipeline/evaluation/compute_DoA_err.pyto change the parameters -
@article{加藤 雅大2024,
title={多チャンネル音響生成を評価するためのマイクロフォンアレイ室内インパルス応答データセットの構築},
author={加藤 雅大 and 小島 諒介},
journal={人工知能学会研究会資料 人工知能基本問題研究会},
volume={128},
pages={40-45},
year={2024},
doi={10.11517/jsaifpai.128.0_40}
}