List WAV file attributes without audioread

조회 수: 2 (최근 30일)
Thomas Webber
Thomas Webber 2021년 1월 13일
답변: Thomas Webber 2021년 1월 15일
Hi all,
I have a large data set of wav files (each file is sampled at 500kHz on 4 channels) and I need to create a table with the filename and duration (as well as some other data which is extracted fromt he file name). I am able to do this with audio read but it takes such a long time to load in each file. Is there anyway to extract the file name and duration from windows explore for example? Or are there any other functions that could do this without loading in everyfile like audioread does? Or even any way of speeding up audio read, for example only loading in one channel rather than all four?
Thanks in advance! :)
Thomas
  댓글 수: 3
Mathieu NOE
Mathieu NOE 2021년 1월 13일
just remembered that there is a better way ! just do this inside a loop and you're done
info = audioinfo(filename)
info =
struct with fields:
Filename: 'C:\Temp\handel.wav'
CompressionMethod: 'Uncompressed'
NumChannels: 1
SampleRate: 8192
TotalSamples: 73113
Duration: 8.9249
Title: []
Comment: []
Artist: []
BitsPerSample: 16
Thomas Webber
Thomas Webber 2021년 1월 15일
Audioinfo! Perfect! This worked like a charm! Thankyou so much :)

댓글을 달려면 로그인하십시오.

채택된 답변

Thomas Webber
Thomas Webber 2021년 1월 15일
For anyone interested see Mathieu NOE's comments above! Thanks Aagin

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by