data.append([w.getparams(), w.readframes(w.getnframes())])
w.close()
output = wave.open(outfile, 'wb')
output.setparams(data[0][0])
output.writeframes(data[0][1])
output.writeframes(data[1][1])
output.close()
How to join two wav files using python?