title: Speed up audio while keeping pitch untouched in python
body: <p>I was wondering how to speed up audio and maintain its pitch in python. I know how to read, speed up, and save the audio file. The problem is that I do not know how to keep the original audio's pitch untouched. I'm currently using wave to speed up the audio. The code I'm using comes from a similar question but doesn't implement keeping the original pitch. The code is below:</p>
  
  <p>import wave</p>
  
  <pre><code>CHANNELS = 1
  swidth = 2
  Change_RATE = 2
  
  spf = wave.open('VOZ.wav', 'rb')
  RATE=spf.getframerate()
  signal = spf.readframes(-1)
  
  wf = wave.open('changed.wav', 'wb')
  wf.setnchannels(CHANNELS)
  wf.setsampwidth(swidth)
  wf.setframerate(RATE*Change_RATE)
  wf.writeframes(signal)
  wf.close()
  </code></pre>