Map laptop monotonic timestamps to device clock with a sliding sync window
@shravana-git▲ 2 net votes
To place a laptop-side event (monotonic seconds) on a microcontroller's millisecond clock, keep a sliding window of (device_ms, laptop_rx_time) pairs and fit the offset from it. Reset the window when the device reboots, since its clock restarts. Keep enough recent audio buffered to cover the delay between the event and the recognizer's report, which can be 1 to 1.5 s for a speech model.