BAF-Net: Modality-Specific Speech Enhancement and Noise-Adaptive Fusion for Acoustic and Body-Conduction Microphone Framework
This is an official PyTorch implementataion of paper "Modality-Specific Speech Enhancement and Noise-Adaptive Fusion for Acoustic and Body-Conduction Microphone Framework", which has been accepted to INTERSPEECH 2025.
The BAF-Net is trained and evaluated with Throat-Acoustic Parining Speech (TAPS) Dataset. The dataset can be accessed at Huggingface.
The noise dataset used for data augmentation during training is the ICASSP 2023 Deep Noise Suppression Challenge dataset, which can be downloaded from here. This dataset is used to add realistic noise to clean speech samples for robust model training.
After downloading the noise dataset, both the noise files and RIR files should be resampled to 16 kHz.
The code for resampling is provided in resample.py.
python resample.py \
--noise_dir PATH_TO_NOISE_DIR \
--rir_dir PATH_TO_RIR_DIR \
[--noise_out OUTPUT_DIR_FOR_NOISE] \
[--rir_out OUTPUT_DIR_FOR_RIR] \
[--sr TARGET_SAMPLE_RATE]
The dataset splits are defined in the following files:
dataset/noise_train.txt: Training set noise filesdataset/noise_dev.txt: Development set noise filesdataset/noise_test.txt: Test set noise files
Similarly, the Room Impulse Response (RIR) dataset splits are defined in:
dataset/rir_train.txt: Training set RIR filesdataset/rir_dev.txt: Development set RIR filesdataset/rir_test.txt: Test set RIR files
These predefined splits ensure reproducibility of the experimental results.
You need to add the directory paths containing the noise and RIR data to the config.yaml file.
dset: noise_dir: PATH_TO_NOISE_DIR rir_dir: PATH_TO_RIR_DIR
Note on DNS-Challenge Dataset: You only need the noise and RIR clips from the DNS-Challenge dataset for data augmentation. The clean speech archives (e.g., Track1_Headset) provided in the DNS dataset are not required and can be completely ignored, as the TAPS dataset provides the primary clean speech and throat-microphone paired data.
Directory Structure & Configuration: The exact names of the root folders containing your noise and RIR files do not matter. The dataloader uses predefined text files (e.g., dataset/noise_train.txt) to locate specific audio files. You simply need to gather all noise clips into one directory and all RIR clips into another.
Once your directories are ready, specify their absolute or relative paths in your configuration file (e.g., conf/config.yaml or when running resample.py):
dset: noise_dir: /your/custom/path/to/noise rir_dir: /your/custom/path/to/rir
pip install -r requirements.txt
Training BAF-Net consists of three stages
- Training two branches of modules: DCCRN and SE-conformer
# Training SE-Conformer
train.py +model=seconformer_tm
# Training DCCRN
train.py +model=dccrn
- Copy the checkpoint files to the directory
# Copy the checkpoint files to the directory
cp outputs/seconformer_tm/best.th $PATH_TO_SEconformer_Checkpoint
cp outputs/dccrn/best.th $PATH_TO_DCCRN_Checkpoint
- End-to-end training BAF-Net
# Training BAF-Net
train.py +model=bafnet \
model.param.checkpoints_dccrn=$PATH_TO_DCCRN_Checkpoint \
model.param.checkpoints_seconformer=$PATH_TO_SEconformer_Checkpoint
We provide training setup for baseline models
# Training DCCRN
train.py +model=dccrn
# Training SE-Conformer version of TM
train.py +model=seconformer_tm
# Training SE-Conformer version of AM
train.py +model=seconformer_am
# Training FCN version of early fusion
train.py +model=fcn_ef
# Training FCN version of late fusion
train.py +model=fcn_lf
# Training Attention-DC-CRN version of early fusion
train.py +model=afdccrn_ef
# Training Attention-DC-CRN version of late fusion
train.py +model=afdccrn_lf
You can use the evaluate.py script to evaluate the performance of BAF-Net and other models. This script computes objective speech quality metrics such as PESQ, STOI, CSIG, CBAK, COVL, and optionally evaluates speech recognition performance (CER, WER) as well.
python evaluate.py \
--model_config conf/model/MODEL_NAME.yaml \
--chkpt_dir outputs/MODEL_NAME \
--chkpt_file best.th \
--noise_dir PATH_TO_NOISE_DIR \
--noise_test dataset/noise_test.txt \
--rir_dir PATH_TO_RIR_DIR \
--rir_test dataset/rir_test.txt \
--snr_step snr_step1 snr_step2 ... \
--eval_stt # Optional STT performance evaluationThe evaluation results are saved to the specified log file, and you can check the performance metrics at various SNR (Signal-to-Noise Ratio) levels.
To generate enhanced speech using trained models, you can use the enhance.py script. This script runs the model on noisy test datasets and saves enhanced speech files (.wav) and spectrograms (.png).
python enhance.py \
--chkpt_dir checkpoint/MODEL_NAME \
--chkpt_file best.th \
--noise_dir PATH_TO_NOISE_DIR \
--noise_test dataset/noise_test.txt \
--rir_dir PATH_TO_RIR_DIR \
--rir_test dataset/rir_test.txt \
--snr 0 \
--output_dir samples/MODEL_NAMEThe enhanced speech samples are saved in the wavs_0dB folder of the specified output directory, and the corresponding spectrograms are saved in the mels_0dB folder. Each sample includes acoustic microphone (AM) input, acoustic microphone output, throat microphone (TM) input, and the model's prediction results.
@inproceedings{kim25s_interspeech,
title = {{Modality-Specific Speech Enhancement and Noise-Adaptive Fusion for Acoustic and Body-Conduction Microphone Framework}},
author = {Yunsik Kim and Yoonyoung Chung},
year = {2025},
booktitle = {{Interspeech 2025}},
pages = {3833--3837},
doi = {10.21437/Interspeech.2025-2581},
issn = {2958-1796},
}
BAF-Net is released under the MIT license as found in the LICENSE file.