GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - yskim3271/BAF-Net: Official PyTorch implementation of BAF-Net: modality-specific speech enhancement and noise-adaptive fusion for acoustic and body-conduction microphones (Interspeech 2025)

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
conf
conf
 
 
dataset
dataset
 
 
models
models
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
criteria.py
criteria.py
 
 
data.py
data.py
 
 
enhance.py
enhance.py
 
 
evaluate.py
evaluate.py
 
 
evaluate.sh
evaluate.sh
 
 
metric_helper.py
metric_helper.py
 
 
readme.md
readme.md
 
 
requirements.txt
requirements.txt
 
 
resample.py
resample.py
 
 
solver.py
solver.py
 
 
train.py
train.py
 
 
utils.py
utils.py
 
 

Repository files navigation

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.

Dataset preparation

The BAF-Net is trained and evaluated with Throat-Acoustic Parining Speech (TAPS) Dataset. The dataset can be accessed at Huggingface.

Noise dataset preparation

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 files
  • dataset/noise_dev.txt: Development set noise files
  • dataset/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 files
  • dataset/rir_dev.txt: Development set RIR files
  • dataset/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

Requirements

pip install -r requirements.txt

Training BAF-Net

Training BAF-Net consists of three stages

  1. Training two branches of modules: DCCRN and SE-conformer
# Training SE-Conformer
train.py +model=seconformer_tm

# Training DCCRN
train.py +model=dccrn
  1. 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
  1. 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

Training Baselines

We provide training setup for baseline models

Single-modal models

  • Deep Complex Convolution Recurrent Network (DCCRN)
# Training DCCRN
train.py +model=dccrn
  • SE-Conformer
# Training SE-Conformer version of TM
train.py +model=seconformer_tm

# Training SE-Conformer version of AM
train.py +model=seconformer_am

Multi-modal models

  • Fully Convolutional Network (FCN)
# Training FCN version of early fusion
train.py +model=fcn_ef

# Training FCN version of late fusion
train.py +model=fcn_lf
  • Attention-based Fusion Densely Connected Convolutional Recurrent Network (Attention-DC-CRN)
# 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

Evaluate models

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 evaluation

The evaluation results are saved to the specified log file, and you can check the performance metrics at various SNR (Signal-to-Noise Ratio) levels.

Inference

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_NAME

The 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.

How to cite

@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},
}

License

BAF-Net is released under the MIT license as found in the LICENSE file.

About

Official PyTorch implementation of BAF-Net: modality-specific speech enhancement and noise-adaptive fusion for acoustic and body-conduction microphones (Interspeech 2025)

Topics

interspeechpytorchsensor-fusionspeech-enhancementthroat-microphone

Resources

Readme
MIT license
Activity

Stars

12 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.