how can i load multiple/all audio files(.wav) in matlab ? all files have different names.
39 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
KSSV
2022 年 10 月 20 日
audioFiles = dir('*.wav') ;
N = length(audioFiles) ;
for i = 1:N
file - audioFiles(i).name ;
% do what you want
end
その他の回答 (1 件)
jibrahim
2022 年 10 月 20 日
% specify your folder
folder = fullfile(matlabroot,'toolbox','audio','samples');
% Create an audio datastore that points to the specified folder.
ADS = audioDatastore(folder, IncludeSubfolders=true)
% While the audio datastore has unread files, read consecutive files
% from the datastore. Use progress to monitor the fraction of files read.
while hasdata(ADS)
data = read(ADS);
fprintf('Fraction of files read: %.2f\n',progress(ADS))
end
参考
カテゴリ
Help Center および File Exchange で Audio and Video Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!