Skip to main content

fasr-enhancement-gtcrn

英文文档地址: README_EN.md

GTCRN 音频增强插件。第一版内置官方 gtcrn_simple.onnx,并通过 EnhancementModel.enhance() 提供离线整段音频增强能力。

安装

pip install fasr-enhancement-gtcrn

注册模型

注册名 类 适用场景
gtcrn GTCRNEnhancement 轻量级 CPU 降噪

使用方式

from fasr.data import Waveform
from fasr_enhancement_gtcrn import GTCRNEnhancement

model = GTCRNEnhancement(sample_rate=16000)
enhanced = model.enhance(Waveform(data=audio, sample_rate=16000))

Confection 配置

[enhancement_model]
@enhancement_models = "gtcrn"
sample_rate = 16000
providers = ["CPUExecutionProvider"]
intra_op_num_threads = 1
inter_op_num_threads = 1

参数

参数 类型 默认值 说明
sample_rate int 16000 输出采样率
model_path str | None None 可选自定义 ONNX 模型路径,默认使用内置模型
providers list[str] ["CPUExecutionProvider"] ONNX Runtime 推理 provider
intra_op_num_threads int >= 1 1 显式设置 ORT intra-op 线程数,服务端推荐开启以避免默认绑核告警
inter_op_num_threads int >= 1 1 显式设置 ORT inter-op 线程数,服务端推荐开启以避免默认绑核告警
n_fft int 512 STFT FFT 大小
hop_length int 256 STFT hop 长度
win_length int 512 STFT window 长度

Realtime 状态

当前版本同时支持离线 enhance() 和流式 push_chunk()。流式路径复用了官方 streaming ONNX 的逐帧推理逻辑,并优先保证与离线输出的数值一致性。当前实现 通过 istft 重建新产生的尾部音频,稳定且容易验证,但在 CPU 开销上还不是最 终极的高性能包装方式。

Metadata

Release files for fasr-enhancement-gtcrn 0.5.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fasr-enhancement-gtcrn 0.5.8
File Size Uploaded
fasr_enhancement_gtcrn-0.5.8.tar.gz 135.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fasr-enhancement-gtcrn 0.5.8
File Interpreter ABI Platform
fasr_enhancement_gtcrn-0.5.8-py3-none-any.whl Python 3 none any Details

Total release size: 271.3 kB

Release files / fasr_enhancement_gtcrn-0.5.8.tar.gz

Download URL fasr_enhancement_gtcrn-0.5.8.tar.gz
Size 135.6 kB
Tags Source
SHA-256 checksum
How to use checksums
29a42481f6d5bda41a552f8c8c23192fb8542308e58797face190bcf6bd6d6a5
BLAKE2b-256 checksum
How to use checksums
bb37d2954662811304b646be1929bb9b83916efb0cd4275acb4570d6baba469a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / fasr_enhancement_gtcrn-0.5.8-py3-none-any.whl

Download URL fasr_enhancement_gtcrn-0.5.8-py3-none-any.whl
Size 135.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ae010da069c062b86394742643b3b9ceeed0bede1c24cd284e31310a6f18e3d
BLAKE2b-256 checksum
How to use checksums
0ce911ff863658403913467e68b9702a35effb672a963879bdb6dcbd54075e40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.5.8 This release

2 release files

0.5.7

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page