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โ
| Error | When |
|---|---|
NCKitError.missingModel / NCKitException.MissingModel | Model not found in bundle / AAR assets |