feat: migrate on-device Qwen3 ASR to CoreML for background Flow dictation
Replace MLX GPU inference with CoreML bundles so transcription continues while the host app is backgrounded. Adds model download and warm-up, vendored Qwen3Speech, and updates onboarding, settings, and copy for the ~1.6 GB CoreML package (iOS 18+).
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// UtteranceTranscriptStitcherTests.swift
|
||||
// OSGKeyboardTests
|
||||
|
||||
import XCTest
|
||||
@testable import OSGKeyboardShared
|
||||
|
||||
final class UtteranceTranscriptStitcherTests: XCTestCase {
|
||||
|
||||
func testMergeWithOverlapRemovesDuplicatedSuffixPrefix() {
|
||||
let merged = UtteranceTranscriptStitcher.mergeWithOverlap(
|
||||
previous: "今天天气很好",
|
||||
next: "很好我们继续"
|
||||
)
|
||||
XCTAssertEqual(merged, "今天天气很好我们继续")
|
||||
}
|
||||
|
||||
func testStitcherOrdersChunksByIndex() {
|
||||
var stitcher = UtteranceTranscriptStitcher()
|
||||
stitcher.append(index: 1, text: "第二段")
|
||||
stitcher.append(index: 0, text: "第一段")
|
||||
XCTAssertEqual(stitcher.composed(), "第一段 第二段")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user