Views
No views yet
| Release | Test PESQ | Test STOI |
|---|---|---|
| 21-04-27 | 3.15 | 93.0 |
pip install speechbrain1import torch
2import torchaudio
3from speechbrain.inference.enhancement import SpectralMaskEnhancement
4
5enhance_model = SpectralMaskEnhancement.from_hparams(
6 source="speechbrain/metricgan-plus-voicebank",
7 savedir="pretrained_models/metricgan-plus-voicebank",
8)
9
10# Load and add fake batch dimension
11noisy = enhance_model.load_audio(
12 "speechbrain/metricgan-plus-voicebank/example.wav"
13).unsqueeze(0)
14
15# Add relative length tensor
16enhanced = enhance_model.enhance_batch(noisy, lengths=torch.tensor([1.]))
17
18# Saving enhanced signal on disk
19torchaudio.save('enhanced.wav', enhanced.cpu(), 16000)run_opts={"device":"cuda"} when calling the from_hparams method.git clone https://github.com/speechbrain/speechbrain/cd speechbrain
pip install -r requirements.txt
pip install -e .cd recipes/Voicebank/enhance/MetricGAN
python train.py hparams/train.yaml --data_folder=your_data_folder@article{fu2021metricgan+,
title={MetricGAN+: An Improved Version of MetricGAN for Speech Enhancement},
author={Fu, Szu-Wei and Yu, Cheng and Hsieh, Tsun-An and Plantinga, Peter and Ravanelli, Mirco and Lu, Xugang and Tsao, Yu},
journal={arXiv preprint arXiv:2104.03538},
year={2021}
}1@misc{speechbrain,
2 title={{SpeechBrain}: A General-Purpose Speech Toolkit},
3 author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},
4 year={2021},
5 eprint={2106.04624},
6 archivePrefix={arXiv},
7 primaryClass={eess.AS},
8 note={arXiv:2106.04624}
9}