I have attempted to use some code on MatlabFandom to load in a number of wav files from seperate subfolders- I am struggling to actually save the .wav files I need.
The files are hundreds of audiofiles relating to speach recognition, they all sit in different subfolders, each with its own date (there are 2 files per day). There are hundreds of subfolders with .wav files in them. I would like the .wav files to be read and saved in an array called 'AudioArray'. I run your code below, I receive an output listing all the file names. But there is no raw data available for me to analyse. I also want to do some processing once the file has been read - in this case I have just put max(audioArray) to show this. Gracias for all help!
myFolder = 'C:\Users\myname\Documents\voicedata\Audio';
errorMessage = sprintf('Error: The following folder does not exist:\n%s\nPlease specify a new folder.', myFolder);
myFolder = uigetdir();
if myFolder == 0
filePattern = fullfile(myFolder, '**/*.wav');
theFiles = dir(filePattern);
for k = 1 : length(theFiles)
baseFileName = theFiles(k).name;
fullFileName = fullfile(theFiles(k).folder, baseFileName);
fprintf(1, 'Now reading %s\n', fullFileName);
AudioArray = audioread(fullFileName);