语言:
- ar
缩略图: 无
管道标签: 自动语音识别
标签:
- whisper
- pytorch
- speechbrain
- Transformer
- hf-asr-leaderboard
许可证: apache-2.0
数据集:
- commonvoice
指标:
- wer
- cer
模型索引:
- 名称: asr-whisper-medium-commonvoice-ar
结果:
- 任务:
名称: 自动语音识别
类型: automatic-speech-recognition
数据集:
名称: CommonVoice 10.0 (阿拉伯语)
类型: mozilla-foundation/common_voice_14_0
配置: ar
分割: test
参数:
语言: ar
指标:
- 名称: 测试 WER
类型: wer
值: '14.82'
推理: false
基于CommonVoice-14.0阿拉伯语微调的whisper medium模型
本仓库提供了所有必要的工具,用于在SpeechBrain中执行基于端到端whisper模型(在CommonVoice阿拉伯语上微调)的自动语音识别。为了获得更好的体验,我们鼓励您了解更多关于SpeechBrain的信息。
该模型的性能如下:
发布日期 |
测试CER |
测试WER |
GPU数量 |
2023年8月1日 |
4.95 |
14.82 |
1xV100 32GB |
流程描述
该ASR系统由whisper编码器-解码器块组成:
- 预训练的whisper-medium编码器被冻结。
- 使用预训练的Whisper分词器。
- 预训练的Whisper-medium解码器(openai/whisper-medium)在CommonVoice阿拉伯语上进行微调。
获得的最终声学表示被传递给贪婪解码器。
系统训练使用的录音采样率为16kHz(单声道)。在调用transcribe_file时,代码会自动对音频进行归一化处理(即重采样+单声道选择)。
安装SpeechBrain
首先,请使用以下命令安装transformers和SpeechBrain:
pip install speechbrain transformers
请注意,我们鼓励您阅读我们的教程并了解更多关于SpeechBrain的信息。
转录您自己的音频文件(阿拉伯语)
from speechbrain.inference.ASR import WhisperASR
asr_model = WhisperASR.from_hparams(source="speechbrain/asr-whisper-medium-commonvoice-ar", savedir="pretrained_models/asr-whisper-medium-commonvoice-ar")
asr_model.transcribe_file("speechbrain/asr-whisper-medium-commonvoice-ar/example-ar.mp3")
GPU推理
要在GPU上执行推理,请在调用from_hparams
方法时添加run_opts={"device":"cuda"}
。
训练
该模型使用SpeechBrain进行训练。要从头开始训练,请按照以下步骤操作:
- 克隆SpeechBrain:
git clone https://github.com/speechbrain/speechbrain/
- 安装:
cd speechbrain
pip install -r requirements.txt
pip install -e .
- 运行训练:
cd recipes/CommonVoice/ASR/transformer/
python train_with_whisper.py hparams/train_ar_hf_whisper.yaml --data_folder=your_data_folder
您可以在这里找到我们的训练结果(模型、日志等)。
限制
SpeechBrain团队不对此模型在其他数据集上的性能提供任何保证。
引用SpeechBrain
@misc{SB2021,
author = {Ravanelli, Mirco and Parcollet, Titouan and Rouhe, Aku and Plantinga, Peter and Rastorgueva, Elena and Lugosch, Loren and Dawalatabad, Nauman and Ju-Chieh, Chou and Heba, Abdel and Grondin, Francois and Aris, William and Liao, Chien-Feng and Cornell, Samuele and Yeh, Sung-Lin and Na, Hwidong and Gao, Yan and Fu, Szu-Wei and Subakan, Cem and De Mori, Renato and Bengio, Yoshua },
title = {SpeechBrain},
year = {2021},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\\\\url{https://github.com/speechbrain/speechbrain}},
}
关于SpeechBrain
SpeechBrain是一个开源的一体化语音工具包。它设计简单、极其灵活且用户友好。在多个领域实现了竞争性或最先进的性能。
网站: https://speechbrain.github.io/
GitHub: https://github.com/speechbrain/speechbrain