Skip to content

Instantly share code, notes, and snippets.

@lsde
Created April 12, 2018 15:04
Show Gist options
  • Save lsde/1b73d498a276685c67556017376531d7 to your computer and use it in GitHub Desktop.
Save lsde/1b73d498a276685c67556017376531d7 to your computer and use it in GitHub Desktop.
#!/bin/env python
import numpy as np
import wavio
a = wavio.read('track1.wav')
b = wavio.read('track2.wav')
c = np.subtract(a.data, b.data)
wavio.write('difference.wav', c, 48000, sampwidth=3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment