Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在MATLAB中将wavwrite及其参数更改为audioread?_Matlab - Fatal编程技术网

如何在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);