c07cf4db9f
Rolls back the v0.2.0 Qwen3 CoreML on-device ASR stack and replaces the
'local engine' UX with iOS 26 SpeechAnalyzer + DictationTranscriber only.
The 'Cloud polish after ASR' toggle (ProviderConfig.localModeCloudPolishEnabled)
lets users opt into a post-ASR DeepSeek round-trip from the local engine.
Defaults to off so the local engine stays genuinely local. New PolishError.missingAPIError
surfaces an inline 'fill in your key' warning when the toggle is on but the
Keychain is empty. DeepSeek preset default model bumped to deepseek-v4-flash.
Deleted:
- OSGKeyboard/ThirdParty/Qwen3Speech/ (74 files, ~16k LoC)
- OSGKeyboard/Services/ModelManager.swift (492)
- OSGKeyboard/Services/OnDeviceModelWarmup.swift (197)
- OSGKeyboard/Services/Qwen3ASRService.swift (257)
- OSGKeyboard/Services/ModelDownloadSourcePicker.swift (126)
- OSGKeyboard/Views/OnDeviceModelsView.swift (184)
- OSGKeyboard/Views/DownloadConfirmSheet.swift (96)
- OSGKeyboardShared/Models/OnDeviceModel.swift (140)
- OSGKeyboardShared/Services/OnDeviceModelStatus.swift (104)
- Qwen3ASRServiceProvider registration in OSGKeyboardApp
- Qwen3Speech package declaration in project.yml
- 5 .qwen3ASR enum / branch reference sites in HomeView, OnboardingView,
LocalEngineSettingsRows, FlowSessionManager, ASRService, EngineServiceLabel
- Two pre-existing Swift 6 strict-concurrency errors in
LiveDictationController + FlowSessionManager (the weak [weak self] in
detached-task MainActor.run blocks) that were blocking clean builds
Added:
- LocalModelsGroup: 'Built-in iOS SpeechAnalyzer' badge + 'Cloud polish
after ASR' Switch toggle
- PolishingService: honour localModeCloudPolishEnabled; new .missingAPIKey
error case with localised warning
- AppGroupStore.localModeCloudPolishEnabled (mirrored into App Group
so the keyboard extension honours the toggle during live dictation)
- SettingsView: show provider/api sections when local-mode cloud polish
is on so the user can paste a DeepSeek key
- FlowSessionManager: route through PolishingService for local + polish-on
flow; translate missingAPIKey into a polished warning
- KeyboardViewController: handle PolishingService.PolishError.missingAPIKey
in the keyboard-side live polish path
- CHANGELOG v0.2.1: documents the rollback + new toggle
- README.md / README.zh.md: engine matrix section, data flow note
Verified: xcodebuild -scheme OSGKeyboard -destination 'generic/platform=iOS Simulator'
build succeeds under SWIFT_STRICT_CONCURRENCY=complete.
33 lines
1.6 KiB
Plaintext
33 lines
1.6 KiB
Plaintext
/* Engine status labels */
|
|
"engine.summary.local" = "On-device · %@";
|
|
"engine.summary.cloud" = "Active: %@";
|
|
"engine.summary.cloudWithModel" = "Active: %1$@ · %2$@";
|
|
"engine.asr.appleSpeech" = "Apple SpeechAnalyzer";
|
|
|
|
/* v0.2.0: flow-level warnings surfaced alongside the final transcript. */
|
|
"flow.warning.cloudPolishMissingKey" = "Cloud polish is on, but no API key is set. Inserted the raw ASR transcript — fill in your DeepSeek key in Settings to enable polish.";
|
|
|
|
/* LLM providers */
|
|
"provider.openai" = "OpenAI";
|
|
"provider.deepseek" = "DeepSeek";
|
|
"provider.qwen" = "Qwen (DashScope)";
|
|
"provider.zhipu" = "Zhipu GLM";
|
|
"provider.moonshot" = "Moonshot";
|
|
"provider.custom" = "Custom";
|
|
|
|
/* LLM errors */
|
|
"error.llm.invalidURL" = "Invalid API URL. Check Base URL in Settings.";
|
|
"error.llm.noAPIKey" = "API Key is missing.";
|
|
"error.llm.http" = "API returned HTTP %lld. Try again later or contact the provider.";
|
|
"error.llm.decoding" = "Failed to parse the API response.";
|
|
"error.llm.transport" = "Network error. Check your connection and try again.";
|
|
"error.llm.rateLimited" = "Too many API requests. Please wait and try again.";
|
|
"error.llm.cancelled" = "Request cancelled.";
|
|
|
|
/* ASR errors */
|
|
"error.asr.localeUnsupported" = "Speech language assets are unavailable. Try again later or switch the recognition language.";
|
|
"error.asr.assetsNotReady" = "Speech language assets are not ready. Try again later.";
|
|
"error.asr.formatUnsupported" = "This device does not support the required audio format.";
|
|
"error.asr.noSpeech" = "No speech detected. Please try again.";
|
|
"error.asr.chunkFailed" = "Segment %lld failed: %@";
|