Aligned output file partially broken

Thanks René for making this available, excellent work!

I currently cannot make the alignment fully work, although it seems close.

Using the attached files, I'm trying this command: VhsDecodeAutoAudioAlign.exe stream-align --sample-size-bytes 2 --stream-sample-rate-hz 48000 --input-file notaligned.flac --output-file aligned.flac --json decode.tbc.json --overwrite

The output file sounds choppy and ffmpeg suggests it's somehow not well-formed: ffmpeg -i aligned.flac outputs

[flac @ 0000021a764f0cc0] Format flac detected only with low score of 1, misdetection possible!
[flac @ 0000021a766f0780] invalid sync code
[flac @ 0000021a766f0780] invalid frame header
[flac @ 0000021a766f0780] decode_frame() failed
[flac @ 0000021a766f0780] sample/frame number mismatch in adjacent frames
[flac @ 0000021a766f0780] Multiple frames in a packet.
Input #0, flac, from 'C:\temp\aligned.flac':
  Duration: N/A, start: 4.712000, bitrate: N/A
  Stream #0:0: Audio: flac, 48000 Hz, mono, s16

Am I doing something wrong or is there some bug in play here? Many thanks in advance for your help.

notaligned.flacdecode.tbc.jsonaligned.flac

Edited by David van Kemenade