Commit Graph
3 Commits
Author SHA1 Message Date
baiqing 294e53745b feat(asr): Apple Speech provider + ASR switcher tab
- 新增 AppleSpeechASRProvider:包装 SFSpeechRecognizer,on-device 优先,
  partial / final 走标准 ASRStreamingSession 协议,无需 API key
- 新增 ASRProviderRegistry:M1 预设 volcengine / apple-speech
- CredentialsVault 增加 activeASRProviderId / configuredASRProviderIds
- DictationCoordinator.makeASRProvider 改为按 vault.activeASRProviderId 路由
- 新增 ASR Tab(chip 切换 + 主操作「保存」按钮);侧边栏导航新增 .asr
- scripts/build-app.sh Info.plist 加入 NSSpeechRecognitionUsageDescription
- Tests/OpenLessCoreTests 新增 ASRProviderRegistryTests
2026-04-29 12:46:55 +08:00
baiqing 377d86c33a feat(asr): introduce ASRProvider protocol + Volcengine wrapper
Phase C-1 of provider abstraction (mirrors LLM-side B-1/B-2/B-3).

- Add ASRProvider / ASRStreamingSession / ASRProviderInfo / ASRMode /
  ASRError to OpenLessCore. Streaming and batch shapes share a single
  protocol; non-self entry throws .unsupportedMode.
- ASRStreamingSession inherits AudioConsumer; sendAudio(_:) gets a
  default impl that forwards to consume(pcmChunk:) — least-invasive
  bridge, no changes to existing AudioConsumer / Recorder /
  BufferingAudioConsumer.
- VolcengineASRProvider wraps existing VolcengineStreamingASR via a
  thin adapter (VolcengineStreamingSessionAdapter). Zero modifications
  to VolcengineStreamingASR / VolcengineFrame / VolcengineCredentials.
- DictationCoordinator now drives ASR through ASRProvider:
  makeASRProvider() returns VolcengineASRProvider when creds exist,
  nil otherwise (silent mock fallback preserved). beginSession,
  endSession, handleCancel, failSession all route through
  asrSession: ASRStreamingSession.
- Add OpenLessASRTests target with VolcengineASRProvider info /
  unsupportedMode coverage, plus ASRProviderInfo / ASRError /
  ASRMode value-shape tests.

C-3 (settings UI) will switch makeASRProvider() to read
vault.activeASRProviderId; partial results stream is wired but
empty-finished pending an internal Volcengine partial hook.
2026-04-29 12:32:49 +08:00
baiqing f5a0c810fa feat: add dictionary hotwords and insights UI 2026-04-27 13:53:18 +08:00