Files
OSGKeyboard/OSGKeyboardShared/Services/CloudASR/CloudASRConnectionCheck.swift
T
Rocky cc8dd1070a feat: macOS architecture, cloud ASR/LLM providers, and 6-step iOS onboarding
- Add macOS menu-bar dictation app with local ASR models (SenseVoice/Qwen3),
  global Option hotkey, and bottom overlay
- Add cloud ASR/LLM providers (Anthropic, Volcengine, Bailian, and more) with
  provider logos, model listing, and connection checks
- Add shared 7-day usage stats UI (UsageStatsCluster / SevenDayUsageChart)
- Add iOS onboarding step 6 for polish LLM setup; hide custom-language-model
  diagnostic toggle behind DEBUG
- Unify iOS onboarding tagline with the macOS brand line ("开口即文字。")
- Rewrite README (Chinese-first, product-oriented) and refresh GitHub Pages
2026-07-11 19:10:20 +08:00

20 lines
754 B
Swift

// CloudASRConnectionCheck.swift
// OSGKeyboard · Shared
//
// Settings "validate connection" probe shared by iOS and macOS.
import Foundation
public enum CloudASRConnectionCheck {
/// Verifies the active cloud ASR client can connect + authenticate.
///
/// Each backend decides how to probe (see `CloudASRTranscribing`):
/// HTTP/batch providers transcribe a short silence clip and treat an
/// empty transcript as success; DashScope realtime only handshakes to
/// `task-started` (pushing fake audio makes it fail with `emptyAudio`).
public static func validate(store: any ConfigurationStore) async throws {
let client = CloudASRClientFactory.make(store: store)
try await client.probeConnection()
}
}