I'm working on a project to compare how similar someone's singing is to the original artist. Mostly interested in the pitch of the voice to see if they're in tune.
The audio files are in .wav format and I've been able to load them with the wave module and convert them to Numpy arrays. Then I built a frequency and a time vector to plot the signal.
raw_audio = wave.open("myAudio.WAV", "r")
audio = raw_audio.readframes(-1)
signal = np.frombuffer(audio, dtype='int16')
fs = raw_audio.getframerate()
timeDelta = 1/(2*fs)
#Get time and frequency vectors
start = 0
end = len(signal)*timeDelta
points = len(signal)
t = np.linspace(start, end, points)
f = np.linspace(0,fs,points)
If I have another signal of the same duration (they're landing at approximately 5-10 seconds). What would be the best way to compare these two signals for similarity?
I've thought of comparing the frequency domains and autocorrelation but I feel that both of those methods have a lot of drawbacks.