Matlab does not record audio
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Maciej Kaczorek
le 1 Fév 2021
Réponse apportée : Sindhu Karri
le 4 Fév 2021
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 commentaire
Walter Roberson
le 1 Fév 2021
(Note to readers: this is a MacOS specific question that applies for Catalina, Mojave, and Big Sur.)
Réponse acceptée
Sindhu Karri
le 4 Fév 2021
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!