如何在MATLAB中将wavwrite及其参数更改为audioread?
我正在研究说话人识别系统,并试图录制一个声音并保存在数据库中以便以后识别如何在MATLAB中将wavwrite及其参数更改为audioread?,matlab,Matlab,我正在研究说话人识别系统,并试图录制一个声音并保存在数据库中以便以后识别 disp('Recording stopped.'); y1 = getaudiodata(micrecorder); y = getaudiodata(micrecorder, 'uint8'); if size(y,2)==2 y=y(:,1); end y = double(y); sound_number = sound_number+1; data{sound_number,1} = y; data{so
disp('Recording stopped.');
y1 = getaudiodata(micrecorder);
y = getaudiodata(micrecorder, 'uint8');
if size(y,2)==2
y=y(:,1);
end
y = double(y);
sound_number = sound_number+1;
data{sound_number,1} = y;
data{sound_number,2} = classe;
data{sound_number,3} = 'Microphone';
data{sound_number,4} = 'Microphone';
st=strcat('u',num2str(sound_number)); %error here
wavwrite(st,y1,samplingfrequency,samplingbits)%error here
save('sound_database.dat','data','sound_number','-append');
msgbox('Sound added to database','Database result','help');
disp('Sound added to database');
但我收到了这个错误:
未定义的函数或变量“
wavswrite
”。语音识别中出现错误(第66行)
wavswrite(y1,采样频率,采样比特数,st)
我试图更改为audioread
,但我不知道如何更改其值。注意:
st
用于表示文件名。已在MATLAB R2015b中删除。您使用的是更高版本,因此出现了错误。wavwrite的等价物是,而不是
收到了什么错误?未定义的函数或变量“wavwrite”。语音识别(第66行)波形写入错误(y1,采样频率,采样比特数,st)
audiowrite(st,y1,samplingfrequency,'BitsPerSample',samplingbits);