# SSTV playback timing and frequency offset

This file experiment compares a speed change with a frequency offset. Both can raise the same leader tone. The speed change also shortens the frame. The original file is a generated Robot 36 practice signal, mono 16-bit PCM at 48 kHz.

Use [the original WAV](https://sstv.org.uk/samples/first-decode/robot36.wav), the dependencies of [Open-SSTV at f773bd4](https://github.com/bucknova/Open-SSTV/tree/f773bd4fcb9da0c68ab915e9a1fa2c024bfdcc98), NumPy, SciPy and Pillow. Use an output directory that does not yet exist.

```sh
python reproduce-timing-offset-check.py robot36.wav /path/to/Open-SSTV timing-output
```

The script checks the input SHA-256 and the decoder source, writes four WAVs and runs the Open-SSTV file decoder on each. It uses [SciPy polyphase resampling](https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.resample_poly.html) for the speed change and its inverse. The frequency offset uses the analytic signal, multiplied by a complex tone at 19 Hz, then takes its real part. The three transforms keep the WAV label at 48 kHz. These are controlled synthetic distortions. The exact inverse speed ratio comes from how the file was generated.

See [the recorded results](timing-offset-check-20261112.json) for versions, commands, durations, leader estimates, decoded sizes and file hashes. The mean absolute RGB difference is measured against the image decoded from the original WAV on a 0 to 255 scale. The 0.15-second leader analysis uses a Hann window and an interpolated 0.5 Hz FFT grid. The test covers one generated sample and a pinned decoder. Live receiver tuning, recorder clock calibration and SSTV app performance remain outside its scope.
