saad speech recognition hausa audio to text

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

简介

这是一个专注于豪萨语(Hausa)的语音识别模型,旨在将该语言的音频高效转换为文本。对于需要处理西非地区语言数据的开发者或研究者来说,它填补了通用大模型在小众语种识别精度上的空白。该模型采用 Apache-2.0 开源协议,上手门槛较低,可轻松集成到自动化转录工作流或翻译管线中,是构建豪萨语语音助手或进行多语言数据集标注的实用工具。

核心亮点

  • 专攻豪萨语语音转文字,识别精度高
  • Apache-2.0 协议,商业化集成无压力
  • 适用于西非语言数据处理与自动化转录
  • 轻量化部署,可作为多语言翻译的前端

使用方法

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

model = AutoModel.from_pretrained("Baghdad99/saad-speech-recognition-hausa-audio-to-text")
tokenizer = AutoTokenizer.from_pretrained("Baghdad99/saad-speech-recognition-hausa-audio-to-text")

Hugging Face 下载

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

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

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download Baghdad99/saad-speech-recognition-hausa-audio-to-text

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

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download Baghdad99/saad-speech-recognition-hausa-audio-to-text config.json --local-dir ./dir

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

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('Baghdad99/saad-speech-recognition-hausa-audio-to-text')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/Baghdad99/saad-speech-recognition-hausa-audio-to-text

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

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Baghdad99/saad-speech-recognition-hausa-audio-to-text

模型文件托管在 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('Baghdad99/saad-speech-recognition-hausa-audio-to-text')
tokenizer = AutoTokenizer.from_pretrained('Baghdad99/saad-speech-recognition-hausa-audio-to-text')

完整文档

来源: HuggingFace

---
language:

  • ha

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

datasets:
  • mozilla-foundation/common_voice_13_0

metrics:
  • wer

model-index:
  • name: Hausa Whisper Small - Saad

results:
- task:
name: Automatic Speech Recognition
type: automatic-speech-recognition
dataset:
name: Common Voice 13
type: mozilla-foundation/common_voice_13_0
config: ha
split: test
args: ha
metrics:
- name: Wer
type: wer
value: 44.41266209000763
---

<!-- 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. -->

Hausa Whisper Small - Saad

This model is a fine-tuned version of openai/whisper-small on the Common Voice 13 dataset.
It achieves the following results on the evaluation set:

  • Loss: 0.7524

  • Wer Ortho: 47.7050

  • Wer: 44.4127

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: 16

  • eval_batch_size: 16

  • seed: 42

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

  • lr_scheduler_type: constant_with_warmup

  • lr_scheduler_warmup_steps: 50

  • training_steps: 500

  • mixed_precision_training: Native AMP

Training results

| Training Loss | Epoch | Step | Validation Loss | Wer Ortho | Wer |
|:-------------:|:-----:|:----:|:---------------:|:---------:|:-------:|
| 0.0104 | 3.18 | 500 | 0.7524 | 47.7050 | 44.4127 |

Framework versions

  • Transformers 4.35.0
  • Pytorch 2.1.0+cu118
  • Datasets 2.14.6
  • Tokenizers 0.14.1