🚀 耳语卡纳达语微型模型
该模型是基于多种公开可用的自动语音识别(ASR)语料库中的卡纳达语数据,对 openai/whisper-tiny 进行微调后的版本。它是耳语微调冲刺项目的一部分。
注意:训练该模型的代码可在 whisper-finetune 仓库中复用。
🚀 快速开始
本模型可用于卡纳达语的自动语音识别任务,能对卡纳达语语音进行转录。
✨ 主要特性
- 基于公开的卡纳达语数据对
openai/whisper-tiny
进行微调,适用于卡纳达语的自动语音识别。
- 提供了训练代码和评估代码,方便复用和评估。
- 支持使用
whisper-jax
进行快速推理。
📦 安装指南
原文档未提及具体安装步骤,此处跳过。
💻 使用示例
基础用法
若要对单个音频文件进行推理,可使用以下代码片段:
>>> import torch
>>> from transformers import pipeline
>>>
>>> audio = "/path/to/audio.format"
>>> device = "cuda:0" if torch.cuda.is_available() else "cpu"
>>> transcribe = pipeline(task="automatic-speech-recognition", model="vasista22/whisper-kannada-tiny", chunk_length_s=30, device=device)
>>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="kn", task="transcribe")
>>> print('Transcription: ', transcribe(audio)["text"])
高级用法
若要对整个数据集进行评估,可使用 whisper-finetune 仓库中的评估代码。
若要使用 whisper-jax
进行快速推理,请先按照 此处 提到的必要安装步骤进行安装,然后使用以下代码片段:
>>> import jax.numpy as jnp
>>> from whisper_jax import FlaxWhisperForConditionalGeneration, FlaxWhisperPipline
>>>
>>> audio = "/path/to/audio.format"
>>> transcribe = FlaxWhisperPipline("vasista22/whisper-kannada-tiny", batch_size=16)
>>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="kn", task="transcribe")
>>> print('Transcription: ', transcribe(audio)["text"])
📚 详细文档
训练和评估数据
训练数据
评估数据
训练超参数
训练过程中使用了以下超参数:
- 学习率:5e-05
- 训练批次大小:88
- 评估批次大小:88
- 随机种子:22
- 优化器:adamw_bnb_8bit
- 学习率调度器类型:线性
- 学习率调度器热身步数:10000
- 训练步数:15008(收敛后终止,初始设置为 51570 步)
- 混合精度训练:True
模型评估指标
属性 |
详情 |
模型类型 |
Whisper Kannada Tiny - Vasista Sai Lodagala |
任务类型 |
自动语音识别 |
数据集 |
google/fleurs (kn_in 配置,测试分割) |
评估指标 |
WER(字错误率),值为 13.38 |
🔧 技术细节
本模型是对 openai/whisper-tiny
在卡纳达语数据上进行微调得到的。微调过程中使用了特定的超参数,以适应卡纳达语的自动语音识别任务。训练代码和评估代码可在 whisper-finetune 仓库中找到。
📄 许可证
本模型采用 Apache-2.0 许可证。
致谢
本工作由 印度理工学院马德拉斯分校语音实验室 完成。
本工作的计算资源由印度电子和信息技术部(MeitY)的 “Bhashini:国家语言翻译任务” 项目资助。