read every audio file in folder in matlab

You can use the dir function to get a list of all the audio files in the folder and loop through them to read them. Here's an example code:

main.m
% set folder location
folder = 'C:\audio_files\';

% get list of all audio files in folder
audio_files = dir(fullfile(folder, '*.wav'));  % replace with format of your audio files

% loop through audio files and read them
for i = 1:length(audio_files)
    audio_file_name = audio_files(i).name;
    audio_file_path = fullfile(folder, audio_file_name);
    audio_data = audioread(audio_file_path);
    
    % do something with audio data
end
441 chars
15 lines

Note that you may need to adjust the audio file format in the dir function to match the format of your audio files. Also, you can replace the audioread function with other audio processing functions to perform different operations on the audio data.

related categories

gistlibby LogSnag