Stateful Core ML and MLX assets for DPDFNet-4, CEVA's 16 kHz real-time speech-enhancement model. This repository is the default DPDFNet-4 source for the DeepFilterNetCoreML Swift product.
Scripts/Conversion/convert_dpdfnet_to_coreml.py| Property | Value |
|---|---|
| Sample rate | 16,000 Hz |
| Input hop | 160 samples / 10 ms |
| FFT | 320 samples |
| DPRNN blocks | 4 |
| Fixed algorithmic delay | 800 samples / 50 ms |
DPDFNet4-Streaming-FP32.mlpackage is the production default. Its conversion validation against the PyTorch graph produced 0.9999999999 output correlation. The FP16 explicit-state and resident-state variants are included for device-specific experiments but are not selected automatically because their fidelity is lower.
Current 60-second Swift/Core ML validation: 13.953 seconds total (4.30x real time), with 0.99999999 waveform correlation to official ONNX. Live p50/p95 model processing latency was 3.686/4.171 ms on the development Apple Silicon Mac. Device results vary.
import DeepFilterNetCoreML
let enhancer = try await DeepFilterNetCoreMLStreamer.load(
configuration: .init(variant: .dpdfNet4)
)
let output = try enhancer.processHop(input160Samples)
DPDFNet4-Streaming-FP32.mlpackage: recommended explicit FP32 state graph.DPDFNet4-Streaming.mlpackage: explicit FP16 state graph.DPDFNet4-Streaming-State.mlpackage: Core ML MLState graph for supported OS versions.DPDFNet4-initial-state-f32.bin: canonical recurrent-state initialization.config.json and model.safetensors: matching Swift MLX/DSP model assets.conversion-report.json: graph-level validation and measured conversion latency.Apache-2.0, matching the official CEVA DPDFNet repository. See LICENSE and the original project.
model.safetensors 11 MiBDPDFNet4-Streaming-FP32.mlpackage/Data/com.apple.CoreML/weights/weight.bin 11 MiBDPDFNet4-Streaming-State.mlpackage/Data/com.apple.CoreML/weights/weight.bin 5 MiBDPDFNet4-Streaming.mlpackage/Data/com.apple.CoreML/weights/weight.bin 5 MiBDPDFNet4-initial-state-f32.bin 205.4 KiB