🚀 Whisper Small Vi V1.1: ナム・フン氏によるベトナム語向けWhisper Smallのファインチューニング版 🚀
このモデルは、ベトナム語の音声データでopenai/whisper-smallモデルをファインチューニングしたものです。モデルの目的は、ベトナム語の自動音声認識(ASR)タスク、特に実世界のシナリオにおける文字起こしの精度と頑健性を向上させることです。
📊 ファインチューニング結果
評価は、様々な地域のアクセントと話し方のスタイルを持つホールドアウトテストセットで行われました。
📝 モデルの説明
Whisper smallモデルは、自動音声認識と翻訳タスク用に設計されたトランスフォーマーベースのシーケンス-to-シーケンスモデルです。複数の言語で680,000時間以上のラベル付き音声データで訓練されています。このモデルのファインチューニング版はベトナム語に焦点を当てており、文字起こしの精度と現地の方言の扱いを向上させることを目指しています。
このモデルはWhisperProcessorと連携して、音声入力をログメルスペクトログラムに前処理し、テキストにデコードします。
📁 データセット
- 総時間: 250時間以上の高品質ベトナム語音声データ
- データソース: 公開のベトナム語データセット
- フォーマット: 16kHzのWAVファイルと対応するテキストトランスクリプト
- 前処理: 音声は正規化され、セグメント化されました。トランスクリプトはクリーニングされ、トークン化されました。
🚀 クイックスタート
ファインチューニングされたモデルを使用するには、以下の手順に従ってください。
基本的な使用法
!pip install transformers torch librosa soundfile --quiet
import torch
import librosa
import soundfile as sf
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
print("Environment setup completed!")
高度な使用法
import torch
import librosa
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
device = "cuda" if torch.cuda.is_available() else "cpu"
print(f"Using device: {device}")
model_id = "namphungdn134/whisper-small-vi"
print(f"Loading model from: {model_id}")
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id).to(device)
forced_decoder_ids = processor.get_decoder_prompt_ids(language="vi", task="transcribe")
model.config.forced_decoder_ids = forced_decoder_ids
print(f"Forced decoder IDs for Vietnamese: {forced_decoder_ids}")
audio_path = "example.wav"
print(f"Loading audio from: {audio_path}")
audio, sr = librosa.load(audio_path, sr=16000)
input_features = processor(audio, sampling_rate=16000, return_tensors="pt").input_features.to(device)
print(f"Input features shape: {input_features.shape}")
print("Generating transcription...")
with torch.no_grad():
predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids)
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
print("📝 Transcription:", transcription)
print("Predicted IDs:", predicted_ids[0].tolist())
⚠️ 制限事項
- このモデルはベトナム語用に特化してファインチューニングされているため、他の言語では性能が低下する可能性があります。
- 重なり合う音声やノイズの多い背景音に対応するのが難しい場合があります。
- 訓練データに十分に表現されていない強い方言のバリエーションでは、性能が低下する可能性があります。
📄 ライセンス
このモデルはMITライセンスの下で提供されています。
📚 引用
このモデルを研究やアプリケーションで使用する場合は、元のWhisperモデルとこのファインチューニング作業を以下のように引用してください。
@article{Whisper2021,
title={Whisper: A Multilingual Speech Recognition Model},
author={OpenAI},
year={2021},
journal={arXiv:2202.12064},
url={https://arxiv.org/abs/2202.12064}
}
@misc{title={Whisper small Vi V1.1 - Nam Phung},
author={Nam Phùng},
organization={DUT},
year={2025},
url={https://huggingface.co/namphungdn134/whisper-small-vi},
url={https://github.com/namphung134/ASR-Vietnamese}
}
📬 お問い合わせ
質問、協力依頼、または提案がある場合は、[namphungdn134@gmail.com]までお気軽にご連絡ください。