from pathlib import Path
import wave,json
r=[]
for n in ['markers.wav','decoded.wav']:
 with wave.open(str(Path(__file__).parent/n),'rb') as w:r.append({'file':n,'frames':w.getnframes(),'rate':w.getframerate()})
assert r[0]['frames']==r[1]['frames']==48000
x=json.loads((Path(__file__).parent/'packet-side-data.json').read_text(encoding='utf-8'));side=[s for p in x['packets'] for s in p.get('side_data_list',[])];assert side;print(json.dumps({'wav':r,'packet_side_data':side},indent=2))
