so I changed the playback speed of my output.wav file using python wave module frame rate method and multiplying previous frame rate by 2, but I want to keep the pitch of the new output.wav the same, because it sounds high pitch. How to do? This is snippet of code I have for read and writing to output.wav. I am looking for simple solution, trying to avoid downloading external libraries. Ok with wave library.
Thanks.
import wave
wf = wave.open('output.wav', 'rb')
RATE = wf.getframerate()
signal = wf.readframes(-1)
channels = wf.getnchannels()
width = wf.getsampwidth()
wf.close()
spf = wave.open('output.wav', 'wb')
spf.setnchannels(channels)
spf.setsampwidth(width)
spf.setframerate(RATE*2)
spf.writeframes(signal)
spf.close()