22-2 ???基?聲學特?

bR@qTɡAڭ̳q`NTuA٬ء]frame^Aq`@ӭإ]tƭӰ򥻶g]fundamental period^A~R^TSxCۧڭ̴NiHq@ӭؤnǯSx]acoustic features^AHKii@BRCq`ڭ̤\ةMؤiH|AӨCX{ؼƫh٬زv]frame rate^AزvVAhһݭnp귽VjCHUOq@qTXhӭتܷNϡG


5.GѤ@qTXءC

ڭ̤Hť@qTAߧYiHPSʦq]volume^B]pitch^M]timbre^Aڭ̭nϥιqӤRTANϥμƾǤӴyzWCSʡAHuGvHժPıCoǥѨC@ӭةҩXӪƭȩΦVqN٬nǯSx]acoustic features^ApUC

WznǯSxA{bɰ쪺iΤ譱AiHܦpUG


5.GnǯSxܩɰ쪺{C

Example 3: frameDisp4fea01.mauFile='taiwanUniversity.wav'; au=myAudioRead(auFile); n=2; au.fs=au.fs/n; au.signal=au.signal(1:n:end, 1); % Down sampling index1=round(0.66*au.fs); frameSize=256; index2=index1+frameSize-1; frame=au.signal(index1:index2); % Take the frame for display audiowrite('frame.wav', frame, au.fs); subplot(2,1,1); plot(au.signal); grid on xlabel('Sample index'); ylabel('Amplitude'); title(auFile); %xlabel('Iޭ'); ylabel('iήT'); title(auFile); axis([1, length(au.signal), -1 1]); line(index1*[1 1], [-1 1], 'color', 'm', 'linewidth', 1); line(index2*[1 1], [-1 1], 'color', 'm', 'linewidth', 1); subplot(2,1,2); plot(frame, '.-'); grid on xlabel('Sample index within the frame'); ylabel('Amplitude'); %xlabel('ؤIޭ'); ylabel('iήT'); axis([1, length(frame), -1 1]); %boxOverlay([60.5 -0.7 52 1.4], 'r', 1, 'G򥻶gi', 'top'); message=sprintf('Timbre:\nWaveform in a fundamental period'); boxOverlay([60.5 -0.5 52 1.2], 'r', 1, message, 'top'); subplot(211); loc1=get(gca, 'position'); subplot(212); loc2=get(gca, 'position'); %% ===== arrow 1 for closeup x1=[loc1(1)+(index1(1)-1)/(length(au.signal)-1)*loc1(3), loc2(1)]; y1=[loc1(2), loc2(2)+loc2(4)]; ah=annotation('arrow', x1, y1, 'color', 'm', 'linewidth', 1); %% ====== arrow 2 for closeup x2=[loc1(1)+(index2-1)/(length(au.signal)-1)*loc1(3), loc2(1)+loc2(3)]; y2=[loc1(2), loc2(2)+loc2(4)]; ah=annotation('arrow', x2, y2, 'color', 'm', 'linewidth', 1); %% Double arrow for fundamental period axisLimit=axis; % axisLimit=[1, 256, -1, 1] xPos=[171, 223]; yPos=[0.65, 0.65]; xRel=loc2(1)+(xPos-axisLimit(1))/(axisLimit(2)-axisLimit(1))*loc2(3); yRel=loc2(2)+(yPos-axisLimit(3))/(axisLimit(4)-axisLimit(3))*loc2(4); ah=annotation('doublearrow', xRel, yRel, 'color', 'r'); textH=text(mean(xPos), mean(yPos), 'Fundamental period', 'horizontal', 'center', 'vertical', 'bottom'); %% Double arrow for volume axisLimit=axis; % axisLimit=[1, 256, -1, 1] xPos=axisLimit(2)+[1, 1]; yPos=[min(frame), max(frame)]; xRel=loc2(1)+(xPos-axisLimit(1))/(axisLimit(2)-axisLimit(1))*loc2(3); yRel=loc2(2)+(yPos-axisLimit(3))/(axisLimit(4)-axisLimit(3))*loc2(4); ah=annotation('doublearrow', xRel, yRel, 'color', 'r'); textH=text(mean(xPos), mean(yPos), 'Volume', 'horizontal', 'center', 'vertical', 'top', 'rotation', 90);

YOϥ FFTN@ӭتTনTWСAWznǯSxiHܦpUG


5.GnǯSxܩW쪺{C

Example 4: frameDisp4fea02.mwaveFile='taiwanUniversity.wav'; au=myAudioRead(waveFile); n=2; au.fs=au.fs/n; au.signal=au.signal(1:n:end, 1); % Down sampling index1=round(0.66*au.fs); frameSize=256; index2=index1+frameSize-1; frame=au.signal(index1:index2); % Take the frame for display frameBasic=frame.*hanning(frameSize); frameExtended=zeros(8*frameSize, 1); frameExtended(1:frameSize)=frameBasic; [magSpec, phaseSpec, freqVec, powerSpecInDb]=fftOneSide(frameExtended, au.fs); plot(freqVec, powerSpecInDb); grid on title('Power spectrum'); xlabel('Frequency (Hz)'); ylabel('Power (dB)'); axis tight %xlabel('Wv (Hz)'); ylabel('T (dB)'); order=10; freqNormalized=freqVec/max(freqVec); p=polyfit(freqNormalized, powerSpecInDb, order); f=polyval(p, freqNormalized); line(freqVec, f, 'color', 'g', 'linewidth', 2); %% Plot FF axisLimit=axis; axisLoc=get(gca, 'position'); xPos=[945.3125, 1085.9375]; yPos=[6.9, 6.9]; xRel=axisLoc(1)+((xPos-axisLimit(1))/(axisLimit(2)-axisLimit(1)))*axisLoc(3); yRel=axisLoc(2)+((yPos-axisLimit(3))/(axisLimit(4)-axisLimit(3)))*axisLoc(4); ah=annotation('doublearrow', xRel, yRel, 'color', 'r'); textH=text(mean(xPos), mean(yPos), 'FF', 'horizontal', 'center', 'vertical', 'bottom'); %% Plot first formant [maxValue, maxId]=max(f); xPos=[freqVec(maxId)+100, freqVec(maxId)]; yPos=[maxValue+20, maxValue]; line(xPos(2), yPos(2), 'marker', 'o', 'color', 'r'); xRel=axisLoc(1)+((xPos-axisLimit(1))/(axisLimit(2)-axisLimit(1)))*axisLoc(3); yRel=axisLoc(2)+((yPos-axisLimit(3))/(axisLimit(4)-axisLimit(3)))*axisLoc(4); ah=annotation('arrow', xRel, yRel, 'color', 'r'); textH=text(xPos(1), yPos(1), 'First formant', 'horizontal', 'center', 'vertical', 'bottom'); %% Plot second formant f(1:round(length(f)/2))=-inf; [maxValue, maxId]=max(f); xPos=[freqVec(maxId)+100, freqVec(maxId)]; yPos=[maxValue+30, maxValue]; line(xPos(2), yPos(2), 'marker', 'o', 'color', 'r'); xRel=axisLoc(1)+((xPos-axisLimit(1))/(axisLimit(2)-axisLimit(1)))*axisLoc(3); yRel=axisLoc(2)+((yPos-axisLimit(3))/(axisLimit(4)-axisLimit(3)))*axisLoc(4); ah=annotation('arrow', xRel, yRel, 'color', 'r'); textH=text(xPos(1), yPos(1), 'Second formant', 'horizontal', 'center', 'vertical', 'bottom'); %% Plot timbre curve point=[1184, -41.83]; xPos=[point(1)+300, point(1)]; yPos=[point(2)+25, point(2)]; xRel=axisLoc(1)+((xPos-axisLimit(1))/(axisLimit(2)-axisLimit(1)))*axisLoc(3); yRel=axisLoc(2)+((yPos-axisLimit(3))/(axisLimit(4)-axisLimit(3)))*axisLoc(4); ah=annotation('arrow', xRel, yRel, 'color', 'r'); textH=text(xPos(1), yPos(1), 'Timbre: Smoothed power spectrum', 'horizontal', 'center', 'vertical', 'bottom'); %% Plot energy point=[freqVec(1), powerSpecInDb(1)]; line(point(1), point(2), 'marker', 'o', 'color', 'r'); xPos=[point(1)+300, point(1)]; yPos=[point(2)-25, point(2)]; xRel=axisLoc(1)+((xPos-axisLimit(1))/(axisLimit(2)-axisLimit(1)))*axisLoc(3); yRel=axisLoc(2)+((yPos-axisLimit(3))/(axisLimit(4)-axisLimit(3)))*axisLoc(4); ah=annotation('arrow', xRel, yRel, 'color', 'r'); textH=text(xPos(1), yPos(1), 'Energy (volume)', 'horizontal', 'center', 'vertical', 'top');

@qTتXAڭ̴NiHwCӭبөnǯSx]iO@ӼƭȡAҦpqάOAάO@ӦVqAҦpWЩάO MFCC^APη|ݭnΨ줣PnǯSxAq۰ʦapoǯSxA~i@Bi򪺤RΤCHUUp`NTѪUΡAHΥiΨ쪺nǯSxάDzߤkC

@~

  1. @qTWvO 16 kHzAYOت׬O 320 ӨIAЦ^UCDG
    1. pGؤ|O 120 IAزvOH
    2. pGزvO 100 frame/secAhؤ|ӬOXIH
  2. ]ڱqڪyTX@ӭءApUϡCpGWvO 8 kHzAЭpoӭتWvC]b򥻶gӶi業ɡA򥻶gӼƥVhVnAHDíwC^


    5.GХѦحpWvC

  3. бqWMTAӸUCW]кɶqϥμƾǤ{ӻ^Aûb`ͬAɷ|JoDz{HG
    1. W]beat frequency^
    2. Ǯ]Doppler effect^

Audio Signal Processing and Recognition (TBzP)