Need help with spectrogram

1 view (last 30 days)
Ricardas Gudonavicius
Ricardas Gudonavicius on 15 Apr 2020
Hello.
I need some advice or help. I have 2 audio signals, they contain different sounds of coins, for example in first audio I have 5 cents , in the second I have 10 cents.
[sample_data1, sample_rate1] = audioread('5centai.wav');
[sample_data2, sample_rate2] = audioread('10centu.wav');
The problem is that I have an unknown signal and I need to recognize it, if that signal has a 5 cent or a 10 cent or both. I was thinking to use spectrogram and some how to compare them. Is that possible? Maybe somebody can suggest better idea?
Some of my code:
[sample_data1, sample_rate1] = audioread('5centai.wav');
[sample_data2, sample_rate2] = audioread('10centu.wav');
[S1,F1,T1,P1] = spectrogram(sample_data1,window,noverlap,nfft,sample_rate1,'yaxis');
surf(T1,F1,10*log10(P1),'edgecolor','none');
axis tight;
view (0,9);
colormap(hot);
set(gca,'clim',[-80 -30]);
xlabel('Temps (Seconds)'); ylabel('Frequences Hz');
[S2,F2,T2,P2] = spectrogram(sample_data2,window,noverlap,nfft,sample_rate2,'yaxis');
surf(T2,F2,10*log10(P2),'edgecolor','none');
axis tight;
view (0,9);
colormap(hot);
set(gca,'clim',[-80 -30]);
xlabel('Temps (Seconds)'); ylabel('Frequences Hz');

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by