record.asv
资源名称:wavedata.rar [点击查看]
上传用户:ggyh88
上传日期:2013-08-22
资源大小:4174k
文件大小:1k
源码类别:
Audio
开发平台:
Matlab
- %录音程序
- duration = 2;
- fs = 16000;
- nbits = 16;
- format = 'int16';
- waveFile='D:Program FilesMATLAB704workBb'; %录好之后的文件放置的路径
- y = wavrecord(duration*fs, fs, format); %D:Program FilesMATLAB704toolboxmatlabaudiovideo
- y = double(y); % Convert from a uint8 to double array
- y = (y-mean(y))/(2^nbits/2); % Make y zero mean and unity maximum
- plot((1:length(y))/fs, y); grid on
- axis([-inf inf -1 1]);
- title(['Wave form of "', waveFile, '"']);
- wavwrite(y, fs, nbits, waveFile); % MATLAB中toolbox的voicebox
- fprintf('路径是