arXiv:2607.25350eess.AScs.SD2026-07

纯C实现的int8语音增强引擎,可在普通CPU上实现3.3倍提速。

faster-enhancer.c: A Dependency-Free int8 Runtime for Streaming Speech Enhancement on Commodity CPUs

  • 全栈优化:int8 GEMM分层+逐帧激活重计算,无需校准
  • 苹果M2单核达0.069实时因子,三星S23+达0.096
  • 无依赖库设计,适合嵌入式低功耗部署

本文研究在通用CPU上运行流式语音增强器的开销。将48kHz下的FastEnhancer-Medium移植至faster-enhancer.c,一个初始化时选定六种int8 GEMM层级的C运行时,保持架构与权重不变。苹果M2单核实现实时因子0.069,相较同机fp32 ONNX Runtime的0.230提升3.3倍;三星S23+(骁龙8 Gen 2)达0.096。加速源于对模型每层的深度定制:逐帧重算激活范围,无需校准集;k=3卷积采用Winograd F(2,3);跨阶段状态使用fp16;GRU与去量化尾部融合;启动后不进行任何内存分配。在824个VoiceBank-DEMAND语音样本上,性能接近fp32,PESQ偏差-0.006,SNR偏差-0.08 dB。速度并非部署成本唯一指标:增强器在麦克风开启期间占用不足一核心,实时因子反映为工作周期。基准测试快速跑完文件,而音频回调需持续响应。按6.67毫秒截止时间调度,每帧增加4.2倍开销,节省49%能耗,且最低功耗核心仍错过96%截止时间。同一架构内所有SIMD层级输出字节一致。该运行时以无依赖库形式开源。

原文摘要 · Abstract (English)

This is an implementation and measurement study of what it costs to run a streaming speech enhancer on a CPU. We port FastEnhancer-Medium at 48 kHz to faster-enhancer.c, a C runtime with six int8 GEMM tiers selected at initialization, leaving architecture and weights untouched. One Apple M2 core reaches 0.069 real-time factor, against 0.230 for the fp32 ONNX Runtime graph on the same machine, a 3.3x speedup. A Galaxy S23+ (Snapdragon 8 Gen 2) reaches 0.096. The speedup comes from specializing every layer of the runtime around one fixed model. Activation ranges are recomputed per frame, so no calibration set is needed; the k=3 convolutions use Winograd F(2,3); cross-stage state is fp16; the GRU and the dequantization epilogues are fused; and nothing is allocated after startup. Over 824 VoiceBank-DEMAND utterances the engine tracks fp32 to within -0.006 PESQ and -0.08 dB SNR. Speed alone does not settle deployment cost. The enhancer holds a fraction of a core for as long as the microphone is open, so its real-time factor is a duty cycle. A benchmark races through a file; an audio callback does not. Pacing to the 6.67 ms deadline costs 4.2x per frame, saves 49% of the energy, and leaves the cheapest core placement missing 96% of its deadlines. All SIMD tiers within an architecture family emit byte-identical output. The runtime is released as a dependency-free library.

语音增强int8推理CPU优化轻量部署

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。