I am looking to pitch shift the audio contained in the sample
variable to a specific frequency without changing the speed of the audio.
Here is the code I have so far.
import sounddevice as sd
SAMPLE_RATE = 48000
def record_sample():
print("recording...")
recording = sd.rec(int(3 * SAMPLE_RATE))
sd.wait()
print("done recording.")
return recording
def init():
sd.default.samplerate = SAMPLE_RATE
sd.default.channels = 1
init()
sample = record_sample()
sd.play(sample)
sd.wait()
How would I go about doing this?
Thanks in advance.