I have to read an audio file and then change the audio data, after changing the audio data i have to write the new audio. I am having trouble getting the audiowrite function to work.
fileName = 'PA6.wav';
audioread('PA6.wav'); %read the file
[y,Fs] = audioread('PA6.wav');
y1 = y / 20; %change the volume
sound(y1,Fs) %play back the new volume, which works
%these are some failed attempts
%then i need to write this new audio into "YourName_PA6_Problem2"