Sinhala Audio to Text CD

提供商AqeelShafy7
分类audio-generation
许可证apache-2.0
下载量6
星标0

简介

Sinhala Audio to Text CD 是一款专注于僧伽罗语(斯里兰卡官方语言)的语音转文字模型。对于需要处理南亚小众语种的开发者来说,它解决了通用模型在特定方言和口音上识别率低的问题。该模型上手门槛较低,适合集成到自动化转录工作流或翻译工具中,能够将音频高效转换为文本,是构建僧伽罗语语音助手或内容存档工具的理想底层组件。

核心亮点

  • 专注僧伽罗语识别,精准度优于通用模型
  • 支持 Apache-2.0 协议,企业级部署无压力
  • 适用于语音转写、多语言翻译及内容存档
  • 轻量化集成,快速构建特定语种转录工具

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("AqeelShafy7/Sinhala_Audio_to_Text_CD")
tokenizer = AutoTokenizer.from_pretrained("AqeelShafy7/Sinhala_Audio_to_Text_CD")

Hugging Face 下载

我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 huggingface_hub:

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download AqeelShafy7/Sinhala_Audio_to_Text_CD

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download AqeelShafy7/Sinhala_Audio_to_Text_CD config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('AqeelShafy7/Sinhala_Audio_to_Text_CD')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/AqeelShafy7/Sinhala_Audio_to_Text_CD

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/AqeelShafy7/Sinhala_Audio_to_Text_CD

模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。

PyTorch / Transformers 使用

安装 Transformers

安装 Transformers
pip install -U transformers torch

模型加载和推理

模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('AqeelShafy7/Sinhala_Audio_to_Text_CD')
tokenizer = AutoTokenizer.from_pretrained('AqeelShafy7/Sinhala_Audio_to_Text_CD')

完整文档

来源: HuggingFace

---
license: apache-2.0
base_model: openai/whisper-small
tags:

  • trnslation

  • generated_from_trainer

model-index:
  • name: Sinhala_Audio_to_Text_CD

results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

Sinhala_Audio_to_Text_CD

This model is a fine-tuned version of openai/whisper-small on the None dataset.

Model description

More information needed

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 1e-05

  • train_batch_size: 8

  • eval_batch_size: 8

  • seed: 42

  • gradient_accumulation_steps: 2

  • total_train_batch_size: 16

  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08

  • lr_scheduler_type: linear

  • lr_scheduler_warmup_steps: 500

  • num_epochs: 10

Training results

Framework versions

  • Transformers 4.38.2
  • Pytorch 2.2.1+cpu
  • Datasets 2.12.0
  • Tokenizers 0.15.2