feat: add streaming cloud ASR, polish routing, and settings card layout

Unify Bailian/Volcengine/OpenAI realtime streaming, ABE polish routing with
fun styles, and a shared card-page Settings hierarchy; bump to 1.1 (build 32).
This commit is contained in:
Rocky
2026-07-28 20:25:17 +08:00
parent 956331a2af
commit d656bac8c3
58 changed files with 4153 additions and 1396 deletions
@@ -139,10 +139,22 @@ public actor ChunkedUtterancePipeline {
let mergedResult = await transcribeChunk(samples: preMerge.samples)
switch mergedResult {
case .success(let text):
stitcher.removeLastSegment()
stitcher.append(index: preMerge.stitchIndex, text: text)
publishPartial(from: stitcher, onPartial: onPartial)
// Empty / whitespace merge must NOT wipe a prior good segment
// (`append` ignores empty text, so remove-then-append would
// silently drop the only transcript the AC327-style bug).
let trimmed = text.trimmingCharacters(in: .whitespacesAndNewlines)
if trimmed.isEmpty {
FlowPipelineDiagnostics.logFinalChunkRecovery(
action: "preMergeKeepPrior",
chunkIndex: chunk.index
)
} else {
stitcher.removeLastSegment()
stitcher.append(index: preMerge.stitchIndex, text: text)
publishPartial(from: stitcher, onPartial: onPartial)
}
case .failure(let message):
// Keep prior stitcher text; treat as a soft chunk warning.
failedChunks += 1
chunkWarnings.append(
SharedL10n.format(