extract chunks of small wav files in specific starting and ending times from a large wav file ?
4 次查看(过去 30 天)
显示 更早的评论
I have the format of start time for ex: (format minutes, seconds, milliseconds) start time = '9,36.486' end time = '12,02.749' how can I extract the sound part exactly between those times from a wav file ? should I convert start and end time using datevec ? and how to extract those from the wav file (ex. audioread ) thanks a lot !!
0 个评论
采纳的回答
Jan
2017-3-29
iTimeS = '9,36.486';
fTimeS = '12,02.749';
iTime = sscanf(strrep(strrep(iTimeS, '.', ''), ',', '.'), '%g');
fTime = sscanf(strrep(strrep(fTimeS, '.', ''), ',', '.'), '%g');
info = audioinfo(File);
sample = round([iTime, fTime] * info.SampleRate);
signal = audioread(File, sample);
0 个评论
更多回答(1 个)
另请参阅
类别
在 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!