I keep getting this error: Error using i(line 13) Device Error: Unanticipated host error

조회 수: 47 (최근 30일)
Fs=8000 ; bits=16; Channels=1;
filename= 'a.wav';
rec=audiorecorder(Fs,bits,Channels);
duration=3;
disp('REC-START');
recordblocking(rec,duration); %This is line 13, where the error is
disp('REC-END');
onoma=getaudiodata(rec);
audiowrite('a.wav',onoma,Fs);
%I'm trying to record an audio file and play it afterwards.
%How can I correct this error?
  댓글 수: 1
oscillator
oscillator 2022년 2월 17일
I used matlab online , wrote the same code and got the following message:
No audio input device found on this system.
What dos that mean? What should I do?

댓글을 달려면 로그인하십시오.

답변 (1개)

Anshika Chourasia
Anshika Chourasia 2022년 2월 23일
Hi,
As a first step in troubleshooting this issue, I would suggest updating the software with latest release as it fixes most of the "Device Error" related issues. And, please make sure you restart MATLAB after plugging in any new devices because MATLAB does not automatically refresh the list of devices.
If the problem still persists then please share the output of the "audiodevinfo" command by saving it to a .MAT file. You can do this by entering the following commands at the command window:
>> info = audiodevinfo;
>> save('audioInfo.mat', 'info');
Ensure that the required device is present in the 'output' field of the struct.

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by