matlab怎么提取音频
matlab怎么提取音频 使用wavreadCreate a WAV file from the example file handel.mat,
and read portions of the file back into MATLAB.% Create WAV file in current folder.
load handel.mat
hfile = 'handel.wav';
wavwrite(y, Fs, hfile)
clear y Fs
% Read the data back into MATLAB, and listen to audio.
= wavread(hfile);
sound(y, Fs);
% Pause before next read and playback operation.
duration = numel(y) / Fs;
pause(duration + 2)
% Read and play only the first 2 seconds.
nsamples = 2 * Fs;
= wavread(hfile, nsamples);
sound(y2, Fs);
pause(4)
% Read and play the middle third of the file.
sizeinfo = wavread(hfile, 'size');
tot_samples = sizeinfo(1);
startpos = tot_samples / 3;
endpos = 2 * startpos;
= wavread(hfile, );
sound(y3, Fs); {:soso_e179:}
页:
[1]