Repository navigation
v0.217.145
Unify test results across TCP fast, TCP realtime, and PipeWire modes
Three root causes of test mode divergence found and fixed:
-
PipeWire loopback resampling: added audio.rate=16000 to loopback node
props, preventing 16kHz→48kHz→16kHz double resampling (~11dB SNR gain). -
PipeWire pipeline latency: added digital-zero filtering in ChunkedReader
that discards all-zero audio chunks unconditionally. Real audio always
has a noise floor, so exact zeros are synthetic (PipeWire pipeline
padding, loopback teardown). Strips ~300ms leading latency. -
TCP realtime missing final flush: Node's createConnection socket.end()
was not doing a proper TCP half-close — the connection closed before the
server's EOF flush transcription completed. Rewrote streamPcm to use
Bun.connect with socket.shutdown() (same as streamPcmFast), fixing the
half-close behavior. TCP fast and realtime now produce identical results.
Also: normalized fully-committed.wav (was -14.2 dBFS, now -1.0 dBFS),
updated pw-stream.test.ts to use kill-loopback shutdown pattern, added
verbose pipeline state/token logging, audio hash tracking for determinism
verification, and tightened test thresholds based on observed results.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com