How to replaced extracted audio files running in a for loop?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello Community,
I am trying to do some features extractions in m4a, trying to extract and replace several audios which are running in a for loop with the initial 'p'.
Audio_files(p).name consist of individual .m4a files running in the for loop with the initial 'p'.
I am running into some problems with my audiowrite line. How should I rewrite the line? What am I missing here? Thank you in advance! :)
[data,samp_rate] = audioread(Audio_files(p).name);
%% equations worked on the audio file and get s, the new starting point of the audio
startSample = s;
endSample = length(data);
extractedData = data(startSample:endSample);
audiowrite(Audio_files(p).name '.m4a', extractedData,fs );
0 件のコメント
採用された回答
Ameer Hamza
2020 年 4 月 15 日
編集済み: Ameer Hamza
2020 年 4 月 15 日
audiowrite cannot save the file in .mat format. Use extension of an audio file. Also use concotenation brackets [ ]
audiowrite([Audio_files(p).name '.wav'], extractedData,fs );
4 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Audio I/O and Waveform Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!