Applied Speech and Audio Processing: With matlab examples
Download 2.66 Mb. Pdf ko'rish
|
Applied Speech and Audio Processing With MATLAB Examples ( PDFDrive )
- Bu sahifa navigatsiya:
- Audio analysis
6.1. Analysis toolkit
143 0 50 100 150 200 250 300 350 400 450 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 X: 64 Y: 0.4179 Cepstrum index Amplitude Figure 6.6 Cepstral plot of a segment of voiced speech, amplitude against cepstral index for a 480-sample analysis window. The likely pitch component has been selected, at index of 64. Cepstral analysis is also used for many other purposes than pitch detection. One of the more useful, and traditional, uses is in the extraction of spectral envelope information for speech analysis. In general, the spectral envelope is the smoothed shape of the fre- quency plot, where the smoothing process really means ignoring the higher frequency components. In the cepstral domain, this can be performed by discarding all cepstral coefficients related to frequencies higher than the envelope frequency. If this is performed, and then the FFT plotted, the smoothing process can be quite obvious. Matlab code is provided below which performs this process, and illustrated, acting on a 480-sample window of voiced speech, named segment, in Figure 6.7. len=length(segment); %Take the cepstrum ps=log(abs(fft(segment))); cep=ifft(ps); %Perform the filtering cut=30; cep2=zeros(1,len); cep2(1:cut-1)=cep(1:cut-1)*2; cep2(1)=cep(1); cep2(cut)=cep(cut); %Convert to frequency domain env=real(fft(cep2)); act=real(fft(cep)); %Plot the result pl1=20*log10(env(1:len/2)); pl2=20*log10(act(1:len/2)); span=[1:fs/len:fs/2]; plot(span,pl1,’k-.’,span,pl2,’b’); xlabel(’Frequency, Hz’); 144 Audio analysis 0 500 1000 1500 2000 2500 3000 3500 4000 13 14 15 16 17 18 19 20 21 22 Frequency, Hz Amplitude, dB Figure 6.7 Frequency plot of a segment of voiced speech (solid line) overlaid with the frequency envelope obtained from the first few cepstral coefficients (dashed line). ylabel(’Amplitude, dB’); It will be noticed in the Matlab code, that as well as discarding the unwanted cepstral coefficients in the cep2 array [1], all of the components between DC and the one immediately below the cutoff frequency are accentuated by being doubled, to better match the required envelope. Apart from performing the cepstrum manually, Matlab contains much faster func- tions to calculate the cepstrum and its inverse in the signal processing toolbox, namely cceps and icceps. These could have been used synonymously with the operations in the Matlab code above. 6.1.6 LSP-based measures Analysis can also be performed using LSP-based measures since usable and inter- pretable information can be extracted from raw LSPs. These analysis techniques are normally used for speech, although to demonstrate their wider application, examples will also be given illustrating the analysis of a musical instrument and of an animal sound. For the following sections, it is assumed that LSP analysis, as described in Section 5.2.4, has been performed, and that a set of line spectral pairs is available for an analysis window. We will first consider instantaneous LSP measures which are means of interpreting a single set of lines from one analysis frame, before we consider the longer term trends of these measures. |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling