Because the MATLAB tool integrates many algorithms. The recording learns to use Matlab to parse the sound frequency.
Ff.wav is a known sound file with a frequency of 17640HZ
Paste the code:
1%1,%[x,fs,bit]=wavread ('D:\\ff.wav');2%2, and then perform feature extraction3%3, and then the classifier identifies4%4, output recognition results5%close all;6%clear All;7[X,fs]=audioread ('D:\\ff.wav');8n=2048;9n=0: N-1;TenXk=fft (X,n); %Fast Fourier transformation of signals OneNuniquepts = Ceil ((n+1)/2); AXk = Xk (1: nuniquepts); %Select the first half, because the second half is a mirror image of the first half part -Magx=abs (XK);the amplitude after Fourier transformation is obtained -% Complete Fourier transform to add absolute abs (XK); DB value: -*log (ABS (XK)/Max (ABS (XK)). theDdd= -*log (magx/Max (MAGX)) -IPoint =-1 ; - forI=1: N - ifMAGX (i) = =Max (MAGX) +IPoint =i; - I + Break ; A End at End -%Create frequency array begin -Txbb_threshold = - ; % error Range -Txbb_characters_num = - ; % assumes altogether 64 frequencies -Txbb_basefrequency_h =17000; % starting frequency -G_ffrequencies = txbb_characters_num* (0: txbb_characters_num-1) +Txbb_basefrequency_h; in%Create frequency array End - to%Find Code table begin +K =1 ; - forI=1: Txbb_characters_num the ifG_ffrequencies (i)- -< Fs/n*ipoint && G_ffrequencies (i) + -> fs/n*IPoint *K =i; $ Break ;Panax Notoginseng End - End the%Find Code table end + A%Print Results the g_ffrequencies (k) +fprintf ('k:%d.\n', k); -Disp'k:.\n');
matlab resolves the frequency of sound files