Fix macOS voice level meter input source#581
Conversation
954b8de to
0c65381
Compare
Greptile SummaryThis PR replaces the macOS overlay's separate
Confidence Score: 5/5Safe to merge — the change is self-contained, well-tested on both the Python and Swift sides, and the AVFoundation dependency is cleanly removed with no remaining references. All changed paths are covered by new or updated tests (Python unit tests, async non-blocking test, Swift XCTest suite, and a self-test flag). The threading and async boundaries are handled correctly: file writes run off the event loop, pending tasks are drained before the recording functions return, and the Swift poll reads only a bounded tail of the file. No correctness or safety issues were found across the full diff. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Mic as Microphone
participant ASR as asr.py
participant TP as Thread Pool
participant LW as AudioLevelLogWriter
participant FS as JSONL File
participant ST as Swift Timer 60ms
participant VL as VoiceLevelLog
participant VM as VoiceLevelMeter UI
Mic->>ASR: PCM chunk
ASR->>ASR: buffer / send to Wyoming
ASR->>TP: _schedule_audio_level_callback
TP->>LW: write_chunk throttled 50ms
LW->>LW: normalized_audio_level
LW->>FS: append JSON line
loop Every 60 ms
ST->>VL: latestLevel
VL->>FS: seek tail 16KB readToEnd
FS-->>VL: lines reversed
VL-->>ST: CGFloat or nil
ST->>VM: updateDisplay
VM-->>VM: smoothing sine-wave bars
end
Reviews (2): Last reviewed commit: "Fix macOS voice level meter input source" | Re-trigger Greptile |
0c65381 to
c9ce5eb
Compare
Summary
Test Plan