MATLAB Answers

0

How to save recorded audio on computer

Asked by vivek sharma on 22 Mar 2016
Latest activity Answered by Walter Roberson
on 22 Mar 2016
Hello. I want to know how to save audio that I record in matlab on my computer so I can later analyzed that, but firstly want to save it.This is my part of program
fs=12000;
q1 = audiorecorder;
disp('Start speaking.')
recordblocking(q1, 3);
disp('End of Recording.');
w1 = getaudiodata(q1);
filename = 'qwerty.wav';
audiowrite(filename,w1,fs)
#####
and this the error message during execution tihs program
Error using audiowrite>validateFilename (line 323)
Cannot create file qwerty.wav. Permission Denied.
Error in audiowrite (line 105)
[props.filename, fileExisted] = validateFilename( props.filename );
Error in recordsaveaudio (line 11)
audiowrite(filename,w1,fs)

  0 Comments

Sign in to comment.

2 Answers

Answer by B.k Sumedha on 22 Mar 2016
Edited by B.k Sumedha on 22 Mar 2016

Right click on the matlab icon and run as administrator.Try this for a solution.
If that does not work try out this one. Check out this

  0 Comments

Sign in to comment.


Answer by Walter Roberson
on 22 Mar 2016

Your current directory is probably one that you do not have write access to. Be sure to cd() to the directory you want the file saved in, and it cannot be under the MATLAB installation directory.

  0 Comments

Sign in to comment.