title: Python / Sox: Upsample / resample and export as WAV
body: <p>I have a Python script that produces a soundwave in the form of a list of floats.</p>
  
  <p>However, the sample rate is 25kHz (or some other arbitrary number): I need to resample at 44.1kHz</p>
  
  <p>One solution path is to export as WAV and then use Sox to upsample from the commandline.</p>
  
  <p>Another solution path is to do everything in Python.</p>
  
  <p>How can I do this?</p>
  
  <p>(PS as usual I will edit the question and/or provide an answer myself if I figure it out)</p>
  
  <p>EDIT: <a href="https://stackoverflow.com/questions/1851384/resampling-interpolating-matrix?lq=1">resampling, interpolating matrix</a></p>
  
  <p>EDIT: <a href="http://urinieto.com/2011/05/audio-resampling-in-python/" rel="nofollow noreferrer">http://urinieto.com/2011/05/audio-resampling-in-python/</a></p>
  
  <p>(I'm still trying to figure out how/if I can use scipy.signal.resample)</p>