Downloads · 30 days
45
6% of all-time downloads
sp-uhh/speech-enhancement-sgmse
speech-enhancement-sgmse is a audio-to-audio model from sp-uhh. Use it for the audio-to-audio task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as mit.
<img src="https://raw.githubusercontent.com/sp-uhh/sgmse/main/diffusionprocess.png" width="500" alt="Diffusion process on a spectrogram: In the forward process noise is gradually added to the clean speech spectrogram…
Downloads · 30 days
45
6% of all-time downloads
All-time downloads
773
Public
Repo size
6.5 GB
Likes
22
Public
Click a slice to open those files.
.ckpt1.3 GB · 100%
From the Hugging Face model README
This repository contains the official PyTorch implementations for the papers:
Audio examples and supplementary materials are available on our SGMSE project page, EARS project page, and Investigating training objectives project page.
The following files are essential for this model:
model.py: Defines the model architecture and training processes.train.py: Script for training the model.enhancement.py: Used for evaluating and enhancing audio files.requirements.txt: Lists the necessary dependencies.calc_metrics.py: Script for calculating evaluation metrics.Please also check out our follow-up work with code available:
pip install -r requirements.txt.
requirements_version.txt for the exact versions we used.wandb login before running our code.--nolog to train.py.lightning_logs/.gdown 1_H3EXvhcYBhOZ9QNUcD5VZHc6ktrRbwQgdown 16K4DUdpmLhDNC7pJhBBc08pkSIn_yMPigdown 1eiOy0VjHh9V9ZUFTxu1Pq2w19izl9ejD--N 50 --snr 0.33.gdown 1t_DLLk8iPH6nj8M5wGeOP3jFPaz3i7K5gdown 1PunXuLbuyGkknQCn_y-RCV2dTZBhyE3Vwget https://www2.informatik.uni-hamburg.de/sp/audio/publications/icassp2025_gense/checkpoints/m1.ckptwget https://www2.informatik.uni-hamburg.de/sp/audio/publications/icassp2025_gense/checkpoints/m2.ckptwget https://www2.informatik.uni-hamburg.de/sp/audio/publications/icassp2025_gense/checkpoints/m3.ckptwget https://www2.informatik.uni-hamburg.de/sp/audio/publications/icassp2025_gense/checkpoints/m4.ckptwget https://www2.informatik.uni-hamburg.de/sp/audio/publications/icassp2025_gense/checkpoints/m5.ckptwget https://www2.informatik.uni-hamburg.de/sp/audio/publications/icassp2025_gense/checkpoints/m6.ckptwget https://www2.informatik.uni-hamburg.de/sp/audio/publications/icassp2025_gense/checkpoints/m7.ckptwget https://www2.informatik.uni-hamburg.de/sp/audio/publications/icassp2025_gense/checkpoints/m8.ckptUsage:
--ckpt option of train.py.--ckpt option of enhancement.py (see section Evaluation below).Training is done by executing train.py. A minimal running example with default settings (as in our paper [2]) can be run with
python train.py --base_dir <your_base_dir>
where your_base_dir should be a path to a folder containing subdirectories train/ and valid/ (optionally test/ as well). Each subdirectory must itself have two subdirectories clean/ and noisy/, with the same filenames present in both. We currently only support training with .wav files.
To see all available training options, run python train.py --help. Note that the available options for the SDE and the backbone network change depending on which SDE and backbone you use. These can be set through the --sde and --backbone options.
Note:
--backbone ncsnpp.--backbone ncsnpp_48k --n_fft 1534 --hop_length 384 --spec_factor 0.065 --spec_abs_exponent 0.667 --sigma-min 0.1 --sigma-max 1.0 --theta 2.0--backbone dcunet. You need to pass --n_fft 512 to make it work.
--spec_factor 0.15 rather than --spec_factor 0.333), but we've found the value in this repository to generally perform better for both models [1] and [2].--backbone ncsnpp_v2.--backbone ncsnpp_v2 --sde sbve --loss_type data_prediction --pesq_weight 5e-4.To evaluate on a test set, run
python enhancement.py --test_dir <your_test_dir> --enhanced_dir <your_enhanced_dir> --ckpt <path_to_model_checkpoint>
to generate the enhanced .wav files, and subsequently run
python calc_metrics.py --test_dir <your_test_dir> --enhanced_dir <your_enhanced_dir>
to calculate and output the instrumental metrics.
Both scripts should receive the same --test_dir and --enhanced_dir parameters. The --cpkt parameter of enhancement.py should be the path to a trained model checkpoint, as stored by the logger in logs/.
We kindly ask you to cite our papers in your publication when using any of our research or code:
@inproceedings{welker22speech,
author={Simon Welker and Julius Richter and Timo Gerkmann},
title={Speech Enhancement with Score-Based Generative Models in the Complex {STFT} Domain},
year={2022},
booktitle={Proc. Interspeech 2022},
pages={2928--2932},
doi={10.21437/Interspeech.2022-10653}
}
@article{richter2023speech,
title={Speech Enhancement and Dereverberation with Diffusion-based Generative Models},
author={Richter, Julius and Welker, Simon and Lemercier, Jean-Marie and Lay, Bunlong and Gerkmann, Timo},
journal={IEEE/ACM Transactions on Audio, Speech, and Language Processing},
volume={31},
pages={2351-2364},
year={2023},
doi={10.1109/TASLP.2023.3285241}
}
@inproceedings{richter2024ears,
title={{EARS}: An Anechoic Fullband Speech Dataset Benchmarked for Speech Enhancement and Dereverberation},
author={Richter, Julius and Wu, Yi-Chiao and Krenn, Steven and Welker, Simon and Lay, Bunlong and Watanabe, Shinjii and Richard, Alexander and Gerkmann, Timo},
booktitle={ISCA Interspeech},
pages={4873--4877},
year={2024}
}
@article{richter2024investigating,
title={Investigating Training Objectives for Generative Speech Enhancement},
author={Richter, Julius and de Oliveira, Danilo and Gerkmann, Timo},
journal={arXiv preprint arXiv:2409.10753},
year={2024}
}
[1] Simon Welker, Julius Richter, Timo Gerkmann. "Speech Enhancement with Score-Based Generative Models in the Complex STFT Domain", ISCA Interspeech, Incheon, Korea, Sep. 2022.
[2] Julius Richter, Simon Welker, Jean-Marie Lemercier, Bunlong Lay, Timo Gerkmann. "Speech Enhancement and Dereverberation with Diffusion-Based Generative Models", IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 31, pp. 2351-2364, 2023.
[3] Julius Richter, Yi-Chiao Wu, Steven Krenn, Simon Welker, Bunlong Lay, Shinji Watanabe, Alexander Richard, Timo Gerkmann. "EARS: An Anechoic Fullband Speech Dataset Benchmarked for Speech Enhancement and Dereverberation", ISCA Interspeech, Kos, Greece, 2024.
[4] Julius Richter, Danilo de Oliveira, Timo Gerkmann. "Investigating Training Objectives for Generative Speech Enhancement", arXiv preprint arXiv:2409.10753, 2024.