🚀 基于WHAM!数据集训练的SepFormer语音增强模型(8k采样率)
本仓库提供了使用 SepFormer 模型进行语音增强(去噪)所需的所有工具。该模型基于SpeechBrain实现,并在 WHAM! 数据集(8k采样率)上进行了预训练。WHAM! 数据集本质上是WSJ0 - Mix数据集的一个版本,包含8k采样率下的环境噪声和混响。为了获得更好的使用体验,建议您进一步了解 SpeechBrain。该模型在WHAM! 数据集测试集上的SI - SNR为14.35 dB。
标签 |
详情 |
模型类型 |
音频到音频、语音增强、SepFormer、Transformer、pytorch、speechbrain |
训练数据 |
WHAM! 数据集(8k采样率) |
许可证 |
apache - 2.0 |
评估指标 |
SI - SNR、PESQ |
版本发布日期 |
测试集SI - SNR |
测试集PESQ |
01 - 12 - 21 |
14.35 |
3.07 |
🚀 快速开始
本项目提供了使用基于SepFormer模型进行语音增强(去噪)的工具。该模型使用SpeechBrain实现,并在WHAM!数据集(8k采样率)上进行了预训练。
📦 安装指南
首先,请使用以下命令安装SpeechBrain:
pip install speechbrain
请注意,建议您阅读我们的教程,进一步了解 SpeechBrain。
💻 使用示例
基础用法
对您自己的音频文件进行语音增强:
from speechbrain.inference.separation import SepformerSeparation as separator
import torchaudio
model = separator.from_hparams(source="speechbrain/sepformer-wham-enhancement", savedir='pretrained_models/sepformer-wham-enhancement')
est_sources = model.separate_file(path='speechbrain/sepformer-wham-enhancement/example_wham.wav')
torchaudio.save("enhanced_wham.wav", est_sources[:, :, 0].detach().cpu(), 8000)
高级用法
在GPU上进行推理:
在调用 from_hparams
方法时添加 run_opts={"device":"cuda"}
即可在GPU上进行推理。
📚 详细文档
训练
训练脚本目前正在一个正在进行的拉取请求中开发。待该PR合并后,我们将立即更新模型卡片。您可以在 这里 找到我们的训练结果(模型、日志等)。
局限性
SpeechBrain团队不保证该模型在其他数据集上的性能。
📄 许可证
本项目采用 apache - 2.0
许可证。
🔖 参考文献
SpeechBrain引用
@misc{speechbrain,
title={{SpeechBrain}: A General-Purpose Speech Toolkit},
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},
year={2021},
eprint={2106.04624},
archivePrefix={arXiv},
primaryClass={eess.AS},
note={arXiv:2106.04624}
}
SepFormer引用
@inproceedings{subakan2021attention,
title={Attention is All You Need in Speech Separation},
author={Cem Subakan and Mirco Ravanelli and Samuele Cornell and Mirko Bronzi and Jianyuan Zhong},
year={2021},
booktitle={ICASSP 2021}
}
@article{subakan2023exploring,
author={Subakan, Cem and Ravanelli, Mirco and Cornell, Samuele and Grondin, François and Bronzi, Mirko},
journal={IEEE/ACM Transactions on Audio, Speech, and Language Processing},
title={Exploring Self-Attention Mechanisms for Speech Separation},
year={2023},
volume={31},
pages={2169-2180},
}
🔗 关于SpeechBrain
- 官网:https://speechbrain.github.io/
- 代码仓库:https://github.com/speechbrain/speechbrain/
- HuggingFace页面:https://huggingface.co/speechbrain/