Skip to main content
Code samples

NCKitModelLocator

Locates the bundled DeepFilterNet3 model and returns a filesystem path for NCKitProcessor.

APIโ€‹

public enum NCKitModelLocator {
public static var defaultBundle: Bundle { get }

public static func modelTarGzURL(bundle: Bundle = defaultBundle) throws -> URL
}

Usageโ€‹

import NCKit

let modelURL = try NCKitModelLocator.modelTarGzURL()
// Optional: search a specific bundle first, then Bundle.main
let modelURL = try NCKitModelLocator.modelTarGzURL(bundle: .main)

Throwsโ€‹

ErrorWhen
NCKitError.missingModel / NCKitException.MissingModelModel not found in bundle / AAR assets