Wav2vec2 Large Xlsr 53 Greek
facebook/wav2vec2-large-xlsr-53モデルをベースに微調整されたギリシャ語音声認識モデルで、16kHzサンプリングレートの音声入力に対応しています。
ダウンロード数 25
リリース時間 : 3/2/2022
モデル概要
このモデルはギリシャ語に最適化された自動音声認識(ASR)モデルで、Wav2Vec2アーキテクチャに基づき、一般音声とCSS10ギリシャ語単話者データセットを使用して微調整されています。
モデル特徴
複数データセット微調整
一般音声とCSS10ギリシャ語単話者データセットを組み合わせて訓練し、モデルの認識精度を向上させます。
テキスト標準化処理
ギリシャ語の特殊文字を標準化処理し、例えばςをσに変換して認識効果を向上させます。
言語モデル不要
追加の言語モデルのサポートなしで直接音声認識に使用できます。
モデル能力
ギリシャ語音声認識
16kHzオーディオ処理
リアルタイム音声文字変換
使用事例
音声書き起こし
ギリシャ語会議記録
ギリシャ語の会議録音を自動的に文字に書き起こします。
単語誤り率18.99%、文字誤り率5.78%
音声アシスタント
ギリシャ語音声アシスタントアプリの音声認識モジュールに使用します。
教育
言語学習アプリ
学習者がギリシャ語の発音と聴力を練習するのを支援します。
🚀 Wav2Vec2-Large-XLSR-53-greek
このモデルは、Common Voice と CSS10 Greek: Single Speaker Speech Dataset を使用して、ギリシャ語で facebook/wav2vec2-large-xlsr-53 をファインチューニングしたものです。このモデルを使用する際には、音声入力が16kHzでサンプリングされていることを確認してください。
📦 モデル情報
属性 | 详情 |
---|---|
データセット | Common Voice、CSS10 Greek: Single Speaker Speech Dataset |
評価指標 | WER、CER |
タグ | audio、automatic-speech-recognition、speech、xlsr-fine-tuning-week |
ライセンス | apache-2.0 |
📚 モデル詳細
- モデル名: V XLSR Wav2Vec2 Large 53 - greek
- タスク: 音声認識 (automatic-speech-recognition)
- データセット: Common Voice el
- 評価指標:
- Test WER: 18.996669
- Test CER: 5.781874
💻 使用例
基本的な使用法
import torch
import torchaudio
from datasets import load_dataset
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
test_dataset = load_dataset("common_voice", "el", split="test[:2%]") #TODO: replace {lang_id} in your language code here. Make sure the code is one of the *ISO codes* of [this](https://huggingface.co/languages) site.
processor = Wav2Vec2Processor.from_pretrained("vasilis/wav2vec2-large-xlsr-53-greek") #TODO: replace {model_id} with your model id. The model id consists of {your_username}/{your_modelname}, *e.g.* `elgeish/wav2vec2-large-xlsr-53-arabic`
model = Wav2Vec2ForCTC.from_pretrained("vasilis/wav2vec2-large-xlsr-53-greek") #TODO: replace {model_id} with your model id. The model id consists of {your_username}/{your_modelname}, *e.g.* `elgeish/wav2vec2-large-xlsr-53-arabic`
resampler = torchaudio.transforms.Resample(48_000, 16_000)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
speech_array, sampling_rate = torchaudio.load(batch["path"])
batch["speech"] = resampler(speech_array).squeeze().numpy()
return batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
with torch.no_grad():
logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
predicted_ids = torch.argmax(logits, dim=-1)
print("Prediction:", processor.batch_decode(predicted_ids))
print("Reference:", test_dataset["sentence"][:2])
高度な使用法
import torch
import torchaudio
from datasets import load_dataset, load_metric
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import re
test_dataset = load_dataset("common_voice", "el", split="test") #TODO: replace {lang_id} in your language code here. Make sure the code is one of the *ISO codes* of [this](https://huggingface.co/languages) site.
wer = load_metric("wer")
processor = Wav2Vec2Processor.from_pretrained("vasilis/wav2vec2-large-xlsr-53-greek") #TODO: replace {model_id} with your model id. The model id consists of {your_username}/{your_modelname}, *e.g.* `elgeish/wav2vec2-large-xlsr-53-arabic`
model = Wav2Vec2ForCTC.from_pretrained("vasilis/wav2vec2-large-xlsr-53-greek") #TODO: replace {model_id} with your model id. The model id consists of {your_username}/{your_modelname}, *e.g.* `elgeish/wav2vec2-large-xlsr-53-arabic`
model.to("cuda")
chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“]' # TODO: adapt this list to include all special characters you removed from the data
normalize_greek_letters = {"ς": "σ"}
# normalize_greek_letters = {"ά": "α", "έ": "ε", "ί": "ι", 'ϊ': "ι", "ύ": "υ", "ς": "σ", "ΐ": "ι", 'ϋ': "υ", "ή": "η", "ώ": "ω", 'ό': "ο"}
remove_chars_greek = {"a": "", "h": "", "n": "", "g": "", "o": "", "v": "", "e": "", "r": "", "t": "", "«": "", "»": "", "m": "", '́': '', "·": "", "’": "", '´': ""}
replacements = {**normalize_greek_letters, **remove_chars_greek}
resampler = {
48_000: torchaudio.transforms.Resample(48_000, 16_000),
44100: torchaudio.transforms.Resample(44100, 16_000),
32000: torchaudio.transforms.Resample(32000, 16_000)
}
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower()
for key, value in replacements.items():
batch["sentence"] = batch["sentence"].replace(key, value)
speech_array, sampling_rate = torchaudio.load(batch["path"])
batch["speech"] = resampler[sampling_rate](speech_array).squeeze().numpy()
return batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def evaluate(batch):
inputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
with torch.no_grad():
logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
pred_ids = torch.argmax(logits, dim=-1)
batch["pred_strings"] = processor.batch_decode(pred_ids)
return batch
result = test_dataset.map(evaluate, batched=True, batch_size=8)
print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
print("CER: {:2f}".format(100 * wer.compute(predictions=[" ".join(list(entry)) for entry in result["pred_strings"]], references=[" ".join(list(entry)) for entry in result["sentence"]])))
テスト結果: 18.996669 %
🔧 学習について
学習にはCommon Voiceの学習データセットが使用されました。また、正規化されたトランスクリプトを使用して、CSS10 Greek
の全データも使用されました。
テキスト前処理では、文字 ς
が σ
に正規化されます。これは、両方の文字が同じ音を発し、ς
が単語の終端文字としてのみ使用されるためです。したがって、この変更は適切な表記に簡単にマッピングできます。文字からすべてのアクセントを削除することも試みましたが、これにより WER
が大幅に改善されました。モデルは収束する前に簡単に 17%
の WER
に達することができました。ただし、トランスクリプションを修正するために行う必要のあるテキスト前処理は、より複雑になります。言語モデルを使用すれば、これらの問題を簡単に解決できるはずです。また、ι
、η
などをすべて1つの文字に変更することも試すことができます。これらはすべて同じ音を発するため、音響モデルの部分を大幅に改善するはずです。同様に、o
と ω
も同じ音にマッピングされるため、これらも音響モデルに役立ちます。ただし、さらなるテキスト正規化が必要になります。
📄 ライセンス
このモデルは apache-2.0
ライセンスの下で提供されています。
Voice Activity Detection
MIT
pyannote.audio 2.1バージョンに基づく音声活動検出モデルで、音声中の音声活動時間帯を識別するために使用されます
音声認識
V
pyannote
7.7M
181
Wav2vec2 Large Xlsr 53 Portuguese
Apache-2.0
これはポルトガル語音声認識タスク向けにファインチューニングされたXLSR-53大規模モデルで、Common Voice 6.1データセットでトレーニングされ、ポルトガル語音声からテキストへの変換をサポートします。
音声認識 その他
W
jonatasgrosman
4.9M
32
Whisper Large V3
Apache-2.0
WhisperはOpenAIが提案した先進的な自動音声認識(ASR)および音声翻訳モデルで、500万時間以上の注釈付きデータで訓練されており、強力なデータセット間およびドメイン間の汎化能力を持っています。
音声認識 複数言語対応
W
openai
4.6M
4,321
Whisper Large V3 Turbo
MIT
WhisperはOpenAIが開発した最先端の自動音声認識(ASR)および音声翻訳モデルで、500万時間以上のラベル付きデータでトレーニングされ、ゼロショット設定において強力な汎化能力を発揮します。
音声認識
Transformers 複数言語対応

W
openai
4.0M
2,317
Wav2vec2 Large Xlsr 53 Russian
Apache-2.0
facebook/wav2vec2-large-xlsr-53モデルをファインチューニングしたロシア語音声認識モデル、16kHzサンプリングレートの音声入力をサポート
音声認識 その他
W
jonatasgrosman
3.9M
54
Wav2vec2 Large Xlsr 53 Chinese Zh Cn
Apache-2.0
facebook/wav2vec2-large-xlsr-53モデルをファインチューニングした中国語音声認識モデルで、16kHzサンプリングレートの音声入力をサポートしています。
音声認識 中国語
W
jonatasgrosman
3.8M
110
Wav2vec2 Large Xlsr 53 Dutch
Apache-2.0
facebook/wav2vec2-large-xlsr-53をファインチューニングしたオランダ語音声認識モデルで、Common VoiceとCSS10データセットでトレーニングされ、16kHz音声入力に対応しています。
音声認識 その他
W
jonatasgrosman
3.0M
12
Wav2vec2 Large Xlsr 53 Japanese
Apache-2.0
facebook/wav2vec2-large-xlsr-53モデルをベースにファインチューニングした日本語音声認識モデルで、16kHzサンプリングレートの音声入力をサポート
音声認識 日本語
W
jonatasgrosman
2.9M
33
Mms 300m 1130 Forced Aligner
Hugging Faceの事前学習モデルを基にしたテキストと音声の強制アライメントツールで、多言語対応かつメモリ効率に優れています
音声認識
Transformers 複数言語対応

M
MahmoudAshraf
2.5M
50
Wav2vec2 Large Xlsr 53 Arabic
Apache-2.0
facebook/wav2vec2-large-xlsr - 53をベースに微調整されたアラビア語音声認識モデルで、Common Voiceとアラビア語音声コーパスで訓練されました。
音声認識 アラビア語
W
jonatasgrosman
2.3M
37
おすすめAIモデル
Llama 3 Typhoon V1.5x 8b Instruct
タイ語専用に設計された80億パラメータの命令モデルで、GPT-3.5-turboに匹敵する性能を持ち、アプリケーションシナリオ、検索拡張生成、制限付き生成、推論タスクを最適化
大規模言語モデル
Transformers 複数言語対応

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-TinyはSODAデータセットでトレーニングされた超小型対話モデルで、エッジデバイス推論向けに設計されており、体積はCosmo-3Bモデルの約2%です。
対話システム
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
RoBERTaアーキテクチャに基づく中国語抽出型QAモデルで、与えられたテキストから回答を抽出するタスクに適しています。
質問応答システム 中国語
R
uer
2,694
98