🚀 doof-ferb/whisper-tiny-vi
本項目是基於大量越南語語音數據集對whisper tiny
模型進行微調得到的自動語音識別模型,在多個越南語語音數據集上有較好的表現。
🚀 快速開始
你可以使用以下代碼示例來使用本模型進行自動語音識別:
import torch
from transformers import pipeline
PIPE = pipeline(task="automatic-speech-recognition", model="doof-ferb/whisper-tiny-vi", device="cuda:0", torch_dtype=torch.float16)
PIPE_KWARGS = {"language": "vi", "task": "transcribe"}
PIPE("audio.mp3", generate_kwargs=PIPE_KWARGS)["text"]
✨ 主要特性
- 基於
openai/whisper-tiny
模型進行微調,針對越南語語音數據進行優化。
- 在多個越南語語音數據集上進行了評估,如
Mozilla CommonVoice (Vietnamese) v16.1
、Google FLEURS (Vietnamese)
和ĐHQG TPHCM VIVOS
。
- 顯著降低了單詞錯誤率(WER),相比原始的
whisper-tiny
模型有更好的性能表現。
📦 安裝指南
本項目使用transformers
庫,你可以通過以下命令安裝:
pip install transformers
💻 使用示例
基礎用法
import torch
from transformers import pipeline
PIPE = pipeline(task="automatic-speech-recognition", model="doof-ferb/whisper-tiny-vi", device="cuda:0", torch_dtype=torch.float16)
PIPE_KWARGS = {"language": "vi", "task": "transcribe"}
PIPE("audio.mp3", generate_kwargs=PIPE_KWARGS)["text"]
📚 詳細文檔
訓練與評估
- 模型經過21k步訓練,熱身比例為5%,批量大小為16×2(使用Kaggle免費的T4 GPU×2)。
- 所有訓練和評估腳本都可以在這裡找到。
評估結果
手動在測試集的越南語部分評估單詞錯誤率(WER),結果如下:
@ float16 |
CommonVoice v16.1 |
FLEURS |
VIVOS |
原始 whisper-tiny |
>100% |
88.6% |
62.5% |
本模型 |
26.6% |
37.1% |
18.7% |
數據集
模型在以下越南語語音數據集上進行訓練和評估:
- doof-ferb/vlsp2020_vinai_100h
- doof-ferb/fpt_fosd
- doof-ferb/infore1_25hours
- doof-ferb/infore2_audiobooks
- quocanh34/viet_vlsp
- linhtran92/final_dataset_500hrs_wer0
- linhtran92/viet_youtube_asr_corpus_v2
- google/fleurs
- mozilla-foundation/common_voice_16_1
- vivos
待辦事項
- [x] 完成訓練併發布檢查點
- [x] 在
Common Voice
、FLEURS
和VIVOS
上評估WER
- [ ] 轉換為
openai-whisper
、whisper.cpp
、faster-whisper
格式
- [ ] 轉換為ONNX格式,嘗試使用 sherpa-onnx 和 whisper-openvino
- [ ] 轉換為TensorRT格式,參考 相關討論
📄 許可證
本項目採用Apache-2.0
許可證。