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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fasr_enhancement_gtcrn-0.5.8.tar.gz | 135.6 kB | Without provenance | Details for fasr_enhancement_gtcrn-0.5.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fasr_enhancement_gtcrn-0.5.8-py3-none-any.whl | Python 3 | none | any | Details for fasr_enhancement_gtcrn-0.5.8-py3-none-any.whl |
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}
|
Security for fasr-enhancement-gtcrn 0.5.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.