Applied Speech and Audio Processing: With matlab examples
Download 2.66 Mb. Pdf ko'rish
|
Applied Speech and Audio Processing With MATLAB Examples ( PDFDrive )
Basic audio processing
0.05 0 –0.05 0.2 0 0 0.02 0.04 0.06 0.08 0.1 0.12 0 X: 0.006875 Y: 0.08471 0.02 0.04 0.06 0.08 0.1 0.12 –0.2 Figure 2.9 Plot of a segment of relatively periodic speech (above) and its autocorrelation analysis (below), both plotted as amplitude against time, with the first correlation peak highlighted. [c,lags]=xcorr(x,y); If only a single argument is provided to xcorr then the analysis results in an auto- correlation, which compares the single vector against each possible time-shifted version of itself. The comparison at time shift k is the sum of the product of each element of the input vector, with the element k positions previous to it. Using this as a tool, we can look for periodicities in the vector being analysed. As an example, if the input vector contains two peaks, then the autocorrelation output will be large at time shifts where one peak ends up being multiplied by the other peak. In that case, the time shift k corresponding to the largest output value would be equal to the separation between the two peaks, in samples. Where the vectors being analysed are more complicated, autocorrelation analysis is a good way of looking for periods in the signal that might be hidden to the naked eye. As an example, assume that we have a short recording of speech in Matlab, imagi- natively called speech. By plotting this, we notice that there is a section in there with a fairly regular structure, perhaps from a voiced segment of audio. For the illustrative purposes, assume this lies between vector elements 9000 and 10 000 in our recording. We are going to ‘cut out’ that section for autocorrelation analysis: segment=speech(9000:10000); Next we perform an autocorrelation analysis and plot both the speech segment and the resulting correlogram. In this example, the plotting commands are also reproduced for reference: [c,lags]=xcorr(segment); subplot(2,1,1); plot([0:1:1000]/8000,segment); axis([0, 0.125. -0.05, 0.05]); subplot(2,1,2); plot(lags(1001:2001)/8000,c(1001:2001)); axis([0, 0.125. -0.2, 0.2]); |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling