title: Audio waveform matching
body: <p><a href="https://i.stack.imgur.com/ZLs4t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZLs4t.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/L78i0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L78i0.png" alt="enter image description here"></a></p>
  
  <p>I am matching two waveform of 400 ms. I am using correlate to check the shift. </p>
  
  <pre><code>cc = correlate(b1,b2,mode="same")
  n=len(cc)
  cc=2*cc/n
  dur=n*dt1/2;
  d=linspace( -dur, dur, n )
  idx = argmax(cc)
  </code></pre>
  
  <p>I am getting the shift between 2 waveform. But how to get the actual match position of two waveform? </p>