from pathlib import Path
import wave,json
p=Path(__file__).parent;r=[]
for n in ['source-44100.wav','retag-48000.wav','resampled-48000.wav']:
 with wave.open(str(p/n),'rb') as w:r.append({'file':n,'rate':w.getframerate(),'frames':w.getnframes(),'duration':w.getnframes()/w.getframerate()})
assert r[0]['frames']==r[1]['frames']==44100 and r[2]['frames']==48000
assert r[0]['duration']==r[2]['duration']==1 and r[1]['duration']==.91875
print(json.dumps(r,indent=2))
