🚀 泰米尔语小型Whisper模型
本模型是基于多种公开可用的自动语音识别(ASR)语料库中的泰米尔语数据,对 openai/whisper-small 模型进行微调后的版本。它是Whisper微调冲刺项目的一部分。
注意:训练此模型的代码可在 whisper-finetune 仓库中复用。
🚀 快速开始
本模型可用于对整个数据集进行评估,评估代码可在 whisper-finetune 仓库中找到。该仓库还提供了使用 whisper-jax 进行快速推理的脚本。
✨ 主要特性
📦 安装指南
使用本模型前,请确保已完成必要的依赖安装。具体安装步骤可参考 whisper-finetune 仓库。
💻 使用示例
基础用法
若要使用本模型对单个音频文件进行转录,可使用以下代码片段:
>>> 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-tamil-small", chunk_length_s=30, device=device)
>>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="ta", task="transcribe")
>>> print('Transcription: ', transcribe(audio)["text"])
高级用法
若要使用 whisper-jax 库进行快速推理,请先按照 此处 提到的步骤完成必要的安装,然后使用以下代码片段:
>>> import jax.numpy as jnp
>>> from whisper_jax import FlaxWhisperForConditionalGeneration, FlaxWhisperPipline
>>>
>>> audio = "/path/to/audio.format"
>>> transcribe = FlaxWhisperPipline("vasista22/whisper-tamil-small", batch_size=16)
>>> transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="ta", task="transcribe")
>>> print('Transcription: ', transcribe(audio)["text"])
📚 详细文档
训练和评估数据
属性 |
详情 |
训练数据 |
IISc - MILE泰米尔语ASR语料库、[ULCA ASR语料库](https://github.com/Open - Speech - EkStep/ULCA - asr - dataset - corpus#tamil - labelled--total - duration - is - 116024 - hours)、Shrutilipi ASR语料库、[微软语音语料库(印度语言)](https://msropendata.com/datasets/7230b4b1 - 912d - 400e - be58 - f84e0512985e)、Google/Fleurs训练+开发集、Babel ASR语料库 |
评估数据 |
[微软语音语料库(印度语言)测试集](https://msropendata.com/datasets/7230b4b1 - 912d - 400e - be58 - f84e0512985e)、Google/Fleurs测试集、IISc - MILE测试集、Babel测试集 |
训练超参数
训练过程中使用了以下超参数:
- 学习率:1.7e - 05
- 训练批次大小:48
- 评估批次大小:32
- 随机种子:22
- 优化器:adamw_bnb_8bit
- 学习率调度器类型:线性
- 学习率调度器热身步数:17500
- 训练步数:29659(初始设置为84740步)
- 混合精度训练:是
🔧 技术细节
本模型是在多个公开可用的泰米尔语ASR语料库上对 openai/whisper-small 模型进行微调得到的。微调过程中使用了特定的超参数设置,以提高模型在泰米尔语语音识别任务上的性能。
📄 许可证
本模型采用 Apache - 2.0 许可证。
致谢
本工作由 印度理工学院马德拉斯分校语音实验室 完成。计算资源由印度电子和信息技术部(MeitY)的“Bhashini:国家语言翻译使命”项目资助。