cc8dd1070a
- 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
20 lines
754 B
Swift
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()
|
|
}
|
|
}
|