🚀 基於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/