BSRoformer GGUF
简介
BSRoformer GGUF 是一款专注于语音增强和噪声消除的音频模型。它通过 GGUF 格式化,极大降低了运行门槛,使得开发者和爱好者无需昂贵的 GPU 也能在本地设备上高效运行。该模型擅长将嘈杂环境中的人声精准提取,有效去除背景噪音,非常适合用于播客后期处理、会议记录预处理或实时语音通话优化。对于习惯使用 llama.cpp 等量化工具的用户来说,它提供了极佳的兼容性和部署便捷度,是目前轻量化语音增强的优秀选择。
核心亮点
- 高效去除背景噪声,显著提升人声清晰度
- GGUF 量化格式,低功耗且支持本地 CPU 运行
- 适用于播客、会议记录等音频预处理场景
- Apache-2.0 协议,对商业集成非常友好
使用方法
安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("chenmozhijin/BSRoformer-GGUF")
tokenizer = AutoTokenizer.from_pretrained("chenmozhijin/BSRoformer-GGUF")
Hugging Face 下载
我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。
操作指引:在下载前,请先通过如下命令安装 huggingface_hub:
操作指引
pip install -U huggingface_hub
命令行下载
下载完整模型库
下载完整模型库
huggingface-cli download chenmozhijin/BSRoformer-GGUF
下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download chenmozhijin/BSRoformer-GGUF config.json --local-dir ./dir
SDK 下载
SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('chenmozhijin/BSRoformer-GGUF')
Git 下载
请确保 lfs 已经被正确安装
Git 下载
git lfs install
git clone https://huggingface.co/chenmozhijin/BSRoformer-GGUF
如果您希望跳过 lfs 大文件下载,可以使用如下命令
跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/chenmozhijin/BSRoformer-GGUF
模型文件托管在 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('chenmozhijin/BSRoformer-GGUF')
tokenizer = AutoTokenizer.from_pretrained('chenmozhijin/BSRoformer-GGUF')
完整文档
来源: HuggingFace
---
tags:
- audio
- music
- source-separation
- mel-band-roformer
pipeline_tag: audio-to-audio
---
BSRoformer-GGUF
Official GGUF model repository for the BSRoformer.cpp project.
This repository contains BS Roformer/Mel-Band-Roformer models converted to the GGUF format, enabling high-performance, cross-platform local inference using the MelBandRoformer.cpp inference engine.
📦 Model List
This repository contains GGUF quantized versions of the following original models:
| Original Model | Original Author | Recommended (Q8_0) | All Versions |
| :--- | :--- | :--- | :--- |
| mel-band-roformer-deux | becruily | Download | View Models |
| BS-RoFormer | anvuew | Download | View Models |
| MelBandRoformers (voc_fv6) | GaboxR67 | Download | View Models |
Quantization Types
To meet different hardware requirements, various quantized versions are provided:
- q8_0 (Recommended): 8-bit quantization. Significantly reduces memory usage and bandwidth requirements while maintaining audio quality almost identical to FP32.
- fp16: 16-bit floating point. Suitable for scenarios requiring maximum precision.
- q4_0 / q4_1 / q5_0 / q5_1: Lower-bit quantization, suitable for devices with low VRAM/RAM.
*(Note: Norm and Bias weights remain in FP32 to ensure numerical stability)*
🚀 Usage
Please use with the BSRoformer.cpp command-line tool.
1. Download Tool
Download the executable for your system from BSRoformer.cpp (or compile it yourself).
2. Download Model
Download the desired
.gguf file (e.g., voc_fv6-Q8_0.gguf) using the direct links in the Model List above, or browse all models from the Files and versions page of this repository.3. Run Inference
```bash
Basic usage
./bs_roformer-cli model_q8_0.gguf input.wav output.wav
Advanced usage (adjust chunk size and overlap to optimize quality)
./bs_roformer-cli model_q8_0.gguf input.wav output.wav --overlap 2