🚀 コモンボイス14.0アラビア語でファインチューニングされたWhisper Medium
このリポジトリは、SpeechBrain内でコモンボイス(アラビア語)でファインチューニングされたエンドツーエンドのWhisperモデルを使用して自動音声認識を行うために必要なすべてのツールを提供しています。より良い体験のために、SpeechBrainについてもっと学ぶことをお勧めします。
モデルの性能は以下の通りです。
リリース |
テストCER |
テストWER |
GPU |
1-08-23 |
4.95 |
14.82 |
1xV100 32GB |
✨ 主な機能
パイプラインの説明
このASRシステムは、Whisperのエンコーダ - デコーダブロックで構成されています。
- 事前学習されたwhisper-mediumエンコーダは凍結されています。
- 事前学習されたWhisperトークナイザーが使用されます。
- 事前学習されたWhisper-mediumデコーダ(openai/whisper-medium)がコモンボイスアラビア語でファインチューニングされています。
得られた最終的な音響表現は、貪欲デコーダに渡されます。
システムは、16kHzでサンプリングされた録音(単チャンネル)で学習されています。コードは、transcribe_fileを呼び出すときに自動的にオーディオを正規化します(リサンプリング + 単チャンネル選択)。
📦 インストール
まず、以下のコマンドで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で推論を行うには、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
📄 ライセンス
このモデルは、Apache-2.0ライセンスの下で提供されています。
📋 モデル情報
プロパティ |
詳細 |
モデルタイプ |
自動音声認識 |
学習データセット |
CommonVoice 10.0 (アラビア語) |
評価指標 |
WER、CER |