Matlab does not record audio

조회 수: 13 (최근 30일)
Maciej Kaczorek
Maciej Kaczorek 2021년 2월 1일
답변: Sindhu Karri 2021년 2월 4일
I am working on the macOS Mojave 10.14.6, I am running the following code to record a short audio waveform:
recObj = audiorecorder(44100,16,1);
disp('Start speaking.');
recordblocking(recObj, 3);
disp('End of Recording.');
play(recObj);
y = getaudiodata(recObj);
plot(y)
Matlab does not record anything. The output of a plot(y) function is just a straight line y = 0. Moreover, Matlab doesn't ask for a permission to access microphone and I am not able to grant this permission in the system_preferences/privacy because the permission table doesn't contain Matlab. I tried opening the software from the terminal. Is there any way to configure it manually?
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 2월 1일
(Note to readers: this is a MacOS specific question that applies for Catalina, Mojave, and Big Sur.)

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

채택된 답변

Sindhu Karri
Sindhu Karri 2021년 2월 4일
There is an issue with the preferences granted in Mac OS. As of now, the only workaround to the issue is to open MATLAB from the terminal without using the "open" command. For most users this will look as (doc):
/Applications/MATLAB_R2019b.app/bin/matlab

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by