whisper small denoising

提供商Taeyeun72
分类speech-enhancement
许可证Apache-2.0
下载量9
星标0

简介

whisper small denoising 是一款基于 OpenAI Whisper 架构的语音增强模型,专门用于解决音频录制中的背景噪音问题。它并非用于语音转文字,而是在前处理阶段将嘈杂的音频“洗干净”,提升信噪比。对于经常处理嘈杂环境录音、或希望提高 ASR(自动语音识别)识别准确率的开发者来说,这是一个轻量且高效的预处理工具。由于基于 small 版本,它在保持较好降噪效果的同时,对计算资源要求较低,能够快速部署在本地端侧,与常见的语音识别流水线无缝衔接。

核心亮点

  • 专注语音去噪,提升音频纯净度
  • 轻量化架构,推理速度快且低功耗
  • 有效降低 ASR 识别错误率
  • Apache-2.0 协议,商业部署无压力

使用方法

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

model = AutoModel.from_pretrained("Taeyeun72/whisper-small-denoising")
tokenizer = AutoTokenizer.from_pretrained("Taeyeun72/whisper-small-denoising")

Hugging Face 下载

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

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

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download Taeyeun72/whisper-small-denoising

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

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

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

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('Taeyeun72/whisper-small-denoising')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/Taeyeun72/whisper-small-denoising

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

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Taeyeun72/whisper-small-denoising

模型文件托管在 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('Taeyeun72/whisper-small-denoising')
tokenizer = AutoTokenizer.from_pretrained('Taeyeun72/whisper-small-denoising')

完整文档

来源: HuggingFace

---
language:

  • ko

base_model: openai/whisper-small-denoising
tags:
  • hf-asr-leaderboard

  • generated_from_trainer

datasets:
  • arrow

metrics:
  • wer

model-index:
  • name: whisper-kor3_de

results:
- task:
name: Automatic Speech Recognition
type: automatic-speech-recognition
dataset:
name: whisper-kor3_de
type: arrow
config: default
split: train
args: 'config: ko, split: valid'
metrics:
- name: Wer
type: wer
value: 31.549453628467354
---

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

whisper-kor3_de

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

  • Loss: 0.5477

  • Wer: 31.5495

  • Cer: 15.9235

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

  • lr_scheduler_warmup_steps: 100

  • training_steps: 1000

Training results

| Training Loss | Epoch | Step | Validation Loss | Wer | Cer |
|:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|
| 1.366 | 0.21 | 50 | 1.0427 | 36.9851 | 17.8672 |
| 0.7035 | 0.42 | 100 | 0.7269 | 34.3514 | 17.0516 |
| 0.526 | 0.64 | 150 | 0.5843 | 35.7803 | 17.8672 |
| 0.5013 | 0.85 | 200 | 0.5556 | 33.1185 | 15.3365 |
| 0.403 | 1.06 | 250 | 0.5383 | 32.6142 | 15.2756 |
| 0.3058 | 1.27 | 300 | 0.5339 | 37.7136 | 18.9267 |
| 0.3081 | 1.48 | 350 | 0.5323 | 34.7716 | 17.3718 |
| 0.3131 | 1.69 | 400 | 0.5260 | 31.6615 | 15.8396 |
| 0.2857 | 1.91 | 450 | 0.5245 | 32.1098 | 14.8487 |
| 0.1625 | 2.12 | 500 | 0.5284 | 31.6895 | 14.8258 |
| 0.1899 | 2.33 | 550 | 0.5284 | 31.8577 | 15.8244 |
| 0.1646 | 2.54 | 600 | 0.5329 | 32.2499 | 16.4875 |
| 0.183 | 2.75 | 650 | 0.5315 | 31.5775 | 15.0393 |
| 0.179 | 2.97 | 700 | 0.5291 | 31.4374 | 14.7572 |
| 0.1048 | 3.18 | 750 | 0.5402 | 31.5775 | 14.8106 |
| 0.1057 | 3.39 | 800 | 0.5418 | 31.8296 | 15.7863 |
| 0.0965 | 3.6 | 850 | 0.5429 | 31.7456 | 15.9921 |
| 0.1098 | 3.81 | 900 | 0.5451 | 32.6422 | 16.8534 |
| 0.0902 | 4.03 | 950 | 0.5453 | 31.5495 | 15.9006 |
| 0.0795 | 4.24 | 1000 | 0.5477 | 31.5495 | 15.9235 |

Framework versions

  • Transformers 4.33.2
  • Pytorch 2.0.1+cu117
  • Datasets 2.14.5
  • Tokenizers 0.13.3