df1c5ff32c
Replace MLX GPU inference with CoreML bundles so transcription continues while the host app is backgrounded. Adds model download and warm-up, vendored Qwen3Speech, and updates onboarding, settings, and copy for the ~1.6 GB CoreML package (iOS 18+).
26 lines
798 B
Swift
26 lines
798 B
Swift
import Foundation
|
|
|
|
/// Errors for Qwen3.5 chat model operations.
|
|
public enum ChatModelError: LocalizedError {
|
|
case modelLoadFailed(String)
|
|
case tokenizerLoadFailed(String)
|
|
case inferenceFailed(String)
|
|
case configNotFound(URL)
|
|
case modelNotFound(URL)
|
|
|
|
public var errorDescription: String? {
|
|
switch self {
|
|
case .modelLoadFailed(let reason):
|
|
"Failed to load chat model: \(reason)"
|
|
case .tokenizerLoadFailed(let reason):
|
|
"Failed to load tokenizer: \(reason)"
|
|
case .inferenceFailed(let reason):
|
|
"Inference failed: \(reason)"
|
|
case .configNotFound(let url):
|
|
"Config not found at \(url.path)"
|
|
case .modelNotFound(let url):
|
|
"Model not found at \(url.path)"
|
|
}
|
|
}
|
|
}
|