Created
August 31, 2024 01:45
-
-
Save aptitudex/a19a984965185409b090a02d2be0dd04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t = (0:size(x,1)-1)/fs; | |
winLength = round(0.05*fs); | |
overlapLength = round(0.045*fs); | |
[f0,idx] = pitch(x,fs,Method="SRH",WindowLength=winLength,OverlapLength=overlapLength); | |
tf0 = idx/fs; | |
sound(x,fs) | |
figure | |
tiledlayout(2,1) | |
nexttile | |
plot(t,x) | |
ylabel("Amplitude") | |
title("Audio Signal") | |
axis tight | |
nexttile | |
pitch(x,fs,Method="SRH",WindowLength=winLength,OverlapLength=overlapLength) | |
title("Pitch Estimations") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment