AudioSangraha Audio to Text
简介
核心亮点
- 基于 Apache-2.0 协议,企业级集成无压力
- 专注语音转文本,适配多种音频转写场景
- 轻量化部署,上手快且易于集成到工作流
- 可与大模型结合,实现语音内容的智能分析
使用方法
# 安装 Hugging Face transformers
pip install transformers torch
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("AqeelShafy7/AudioSangraha-Audio_to_Text")
tokenizer = AutoTokenizer.from_pretrained("AqeelShafy7/AudioSangraha-Audio_to_Text")
Hugging Face 下载
我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。
操作指引:在下载前,请先通过如下命令安装 huggingface_hub:
pip install -U huggingface_hub
命令行下载
下载完整模型库
huggingface-cli download AqeelShafy7/AudioSangraha-Audio_to_Text
下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download AqeelShafy7/AudioSangraha-Audio_to_Text config.json --local-dir ./dir
SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('AqeelShafy7/AudioSangraha-Audio_to_Text')
Git 下载
请确保 lfs 已经被正确安装
git lfs install
git clone https://huggingface.co/AqeelShafy7/AudioSangraha-Audio_to_Text
如果您希望跳过 lfs 大文件下载,可以使用如下命令
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/AqeelShafy7/AudioSangraha-Audio_to_Text
模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。
PyTorch / Transformers 使用
安装 Transformers
pip install -U transformers torch
模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('AqeelShafy7/AudioSangraha-Audio_to_Text')
tokenizer = AutoTokenizer.from_pretrained('AqeelShafy7/AudioSangraha-Audio_to_Text')
完整文档
---
license: apache-2.0
base_model: openai/whisper-small
tags:
- trnslation
- generated_from_trainer
metrics:
- wer
model-index:
- name: AudioSangraha-Audio_to_Text
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. -->
AudioSangraha-Audio_to_Text
This model is a fine-tuned version of openai/whisper-small on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 0.3071
- Wer: 52.3227
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
| Training Loss | Epoch | Step | Validation Loss | Wer |
|:-------------:|:-----:|:----:|:---------------:|:-------:|
| 0.1036 | 3.91 | 1000 | 0.2257 | 55.1779 |
| 0.007 | 7.81 | 2000 | 0.3071 | 52.3227 |
Framework versions
- Transformers 4.37.2
- Pytorch 2.1.0+cu121
- Datasets 2.17.0
- Tokenizers 0.15.1