?? examp_speech.m
字號:
%EXAMP_SPEECH Spectrogram of speech signal.%% This example show how to work with almost real world data.%% FIGURE 1 Linus%% This show a spectrogram of Linus Thorvalds saying "My name is% Linus Thorvalds, and I pronounce Linux as Linux"%% The 90% lowest values have been filtered away, to produce a% cleaner plot.%disp('Type "help examp_speech" to see a description of how this example works.');% Load the signalf=linus();% The parameters below are choosen such that the last part of the signal is% cut of; this does not matter, it is zero anyway. L=40320;a=224;M=280;b=L/M;% Optimally centered window.g=pgauss(L,a/b);% Get some coefficients.c=dgt(f,g,a,M,L);% Since the signal is real, then the absolute value of the% upper half of crect is a mirror image of the lower half. Therefore, we skip% it. cplot=abs(c(1:floor(M/2)+1,:)).^2;% Plot.figure(1);% Plotting is diffent in Matlab and Octave.if isoctave title('Linus speaking.'); imagesc(flipud(largestr(cplot,.1)));else contour(log(largestr(cplot,.1)+eps)); title('Linus speaking.');end;% XXL: Wouldn't it be better to have 'real' time and frequency scales?% use sgram here????% We need to figure out what this example should do.% XXL: For speech I was expecting sound output%if ~isoctave % maybe only working for matlab?% if ispc% wavplay(f,8000) % SR= 8000 estimated% else % unix : does it work?% % there should not be other systems, no?% auwrite(f,8000,16,'/tmp/tmpsnd.au');% unix('cat /tmp/tmpsnd.au >/dev/audio'); % % % also possible:% % wavwrite(SIG.sig/m,SIG.fs,'/tmp/tmp.wav');% % unix('play /tmp/tmp.wav');% % unix('rm -f /tmp/tmp.wav'); % end%end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -