Mac: stabilize voice wake test flow
Why: voice wake tests often delivered partial/final transcripts without reliable word timings, so trigger matching failed, timeouts overwrote detections, and test runs/mic capture kept running after UI changes. What: add text-only/prefix fallback and silence-based detection in the test flow, stop/clean up any prior test, cancel timeout on detection/stop, and tear down meter/test when the Voice Wake tab is inactive. Runtime detection now falls back on final text-only matches when timing is missing. UI state now reflects finalizing and prevents hanging tests.
This commit is contained in:
committed by
Peter Steinberger
parent
2140caaf67
commit
0f1a262ae1
@@ -57,6 +57,9 @@ struct VoiceWakeTestCard: View {
|
||||
.symbolEffect(.pulse)
|
||||
.foregroundStyle(Color.accentColor))
|
||||
|
||||
case .finalizing:
|
||||
AnyView(ProgressView().controlSize(.small))
|
||||
|
||||
case .detected:
|
||||
AnyView(Image(systemName: "checkmark.circle.fill").foregroundStyle(.green))
|
||||
|
||||
@@ -79,6 +82,9 @@ struct VoiceWakeTestCard: View {
|
||||
case let .hearing(text):
|
||||
"Heard: \(text)"
|
||||
|
||||
case .finalizing:
|
||||
"Finalizing…"
|
||||
|
||||
case .detected:
|
||||
"Voice wake detected!"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user