Skip to main content
Code samples

NCKit v1.0.0

Released: May 2026

Initial release of NCKit โ€” enterprise on-device noise cancellation SDK for iOS.

What's Includedโ€‹

Core Engineโ€‹

  • NCKitProcessor โ€” NCKit neural noise suppression via libdf C runtime
    • df_create / df_process_frame / df_free lifecycle management
    • frameLength property for buffer sizing
    • Runtime setAttenLim(_:) and setPostFilterBeta(_:) โ€” no model reload required
    • Automatic memory management via Swift ARC (deinit calls df_free)

File Processingโ€‹

  • NCKitFileProcessor โ€” Offline file denoise pipeline
    • Supports any format AVAudioFile can open: WAV, M4A, MP4, MOV, MP3, AIFF, CAF
    • Automatic resampling to 48 kHz via AVAudioConverter
    • Automatic mono downmix for multi-channel input
    • Chunked I/O โ€” constant memory usage regardless of file length
    • Lookahead compensation (2-frame delay, ~20ms) handled automatically
    • Output: 16-bit PCM WAV, 48 kHz, mono

Model Discoveryโ€‹

  • NCKitModelLocator โ€” Automatic model bundle resolution
    • Supports SPM (Bundle.module) and XCFramework (Bundle(for: NCKitProcessor.self)) builds
    • Falls back to Bundle.main for app-bundled model deployments
    • Copy-once behavior โ€” idempotent across multiple calls

Normalizationโ€‹

  • NCKitAudioNormalizer โ€” Post-denoise loudness normalization
    • Speech-gated RMS measurement (20ms windows, 15th-percentile noise floor)
    • Single static makeup gain โ€” no pumping artifacts
    • Configurable target loudness, gain cap, and peak ceiling
    • Tanh soft limiter โ€” smooth peak control without harmonic distortion

Error Handlingโ€‹

  • NCKitError โ€” Typed, Sendable error enum
    • 7 structured cases covering all failure modes
    • Safe across Swift concurrency actor boundaries

Distributionโ€‹

  • Swift Package Manager โ€” binary target, local path and remote git
  • CocoaPods โ€” vendored XCFramework via podspec
  • Manual XCFramework โ€” drag-and-drop integration

XCFramework Slicesโ€‹

SlicePlatform
ios-arm64Physical iPhone and iPad
ios-arm64-simulatorApple Silicon Mac simulator

Requirementsโ€‹

Version
iOS16.0+
Xcode15.0+
Swift5.9+

Known Limitationsโ€‹

  • x86_64 (Intel Mac) simulator not supported โ€” use Rosetta or a physical device
  • Model loading takes 50โ€“200ms โ€” initialize NCKitProcessor at app launch, not on demand
  • libdf 2-frame lookahead introduces 20ms of latency in real-time use (unavoidable with lookahead models)
  • Output format is always 16-bit PCM WAV at 48 kHz mono โ€” no configurable output format in this release