feat(asr): Apple Speech 本地 ASR provider 基础(Draft, issue #574)#625
Draft
appergb wants to merge 1 commit into
Draft
feat(asr): Apple Speech 本地 ASR provider 基础(Draft, issue #574)#625appergb wants to merge 1 commit into
appergb wants to merge 1 commit into
Conversation
从旧 WIP 分支抢救 provider 并重新落到当前 beta 结构;只含可干净合并的基础,coordinator/dictation 接线、命令、完整编译验证待后续(见 PR 待办)。 - asr/local/apple_speech_provider.rs:SFSpeechRecognizer 批处理识别 + 授权 + objc2 桥接 + 单测 - asr/local/mod.rs:注册 + APPLE_SPEECH_PROVIDER_ID + is_apple_speech - build.rs:链接 Speech.framework(macOS);Info.plist:NSSpeechRecognitionUsageDescription - 前端:LocalAsr / ProvidersSection / Overview / shared + 5 语言 i18n
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
6 tasks
pull Bot
pushed a commit
to yimmy23/openless
that referenced
this pull request
Jun 11, 2026
…pen-Less#574) 承接草稿 PR Open-Less#625 的 provider 基础,补完后端接线: - coordinator: ActiveAsr::AppleSpeech 变体(macOS only) - asr_setup: build_apple_speech + ensure_asr_credentials 平台门控 + build_qa_asr_start QA 接线 + is_keyless_local_asr_provider - dictation_session/dictation_end: 听写 start + 批处理 transcribe(沿用 local_qwen 动态超时) - qa_session: QA transcribe arm - resources: cancel arm - commands: active_apple_speech_asr_is_supported(非 macOS 返回 false)+ keyless 校验白名单 + asr_configured_for_provider + set_active_asr_provider 非 macOS 拒绝门控 provider 仅 macOS 编译;非 macOS 由门控判不可用。前端 UI/i18n 已随 Open-Less#625 落地。 验证:cargo check(macOS)通过、provider 单测 5/5 通过、npm run build 通过。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
背景
旧分支
feat/issue-574-apple-speech-asr落后beta112 提交,且coordinator.rs/coordinator/dictation.rs已被refactor/split-dictation(#619) 彻底重构、commands.rs拆成了commands/模块,无法 rebase(整文件冲突)。本 PR 从旧 WIP 抢救出 provider 实现,重新落到当前beta结构。本 PR 已含(可干净合并的基础,已核验符号依赖存在)
asr/local/apple_speech_provider.rs:SFSpeechRecognizer批处理识别(16k/mono PCM → 临时 WAV →SFSpeechURLRecognitionRequest),授权流程、objc2 桥接、TempFileGuardRAII、单测齐全asr/local/mod.rs:注册 provider +APPLE_SPEECH_PROVIDER_ID = "apple-speech"+is_apple_speech()build.rs:链接Speech.framework(macOS)Info.plist:NSSpeechRecognitionUsageDescriptionLocalAsr页 /ProvidersSection/Overview/shared+ en/ja/ko/zh-CN/zh-TW i18n待办(合并前必须完成)
coordinator/dictation.rs仿is_local_qwen3分支加is_apple_speech处理(apple-speech 无需下载模型,最接近 qwen3:buffer →transcribe())coordinator.rs接入 apple-speech 的 provider 构建commands/local_asr.rs(或新文件)加 apple-speech「是否支持 / 是否已配置」命令 + 平台门控(非 macOS 判不可用)cargo check --manifest-path src-tauri/Cargo.toml(CI 门禁,三平台)+npm run buildcargo fmt+cargo clippy约束
#![cfg(target_os = "macos")]);非 macOS 由上层门控为不可用🤖 Generated with Claude Code
PR Type
Enhancement, Documentation
Description
Introduce Apple Speech local ASR provider for macOS
Backend implementation using SFSpeechRecognizer with objc2 bridge
Frontend UI card for activation and language support (5 i18n locales)
Link Speech.framework in build.rs and add NSSpeechRecognitionUsageDescription
Diagram Walkthrough
File Walkthrough
6 files
New Apple Speech ASR provider with objc2 bridgeRegister Apple Speech provider and constantsAdd Apple Speech activation UI cardMap apple-speech ID to display nameAdd apple-speech preset and hide from dropdownExtend AsrPresetId type with apple-speech2 files
Link Speech.framework for macOSAdd NSSpeechRecognitionUsageDescription5 files
Add English i18n strings for Apple SpeechAdd Japanese i18n strings for Apple SpeechAdd Korean i18n strings for Apple SpeechAdd Simplified Chinese i18n strings for Apple SpeechAdd Traditional Chinese i18n strings for Apple Speech