🚀 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
许可证。