MATLAB Answers

Error using audioDatastore/read (line 25)

조회 수: 44(최근 30일)
Zihui Cai
Zihui Cai 3 Mar 2021
댓글: jibrahim 3 Mar 2021
I have run my program on my MacBook (R2020a), there is no such error, however, after i copied my whole program to another Windows computer (R2019a) there is a error message for Error using audioDatastore/read (line 25)
Error using audioDatastore/read (line 25)
File could not be read due to an unexpected error. Reason: File contains data in an unknown format.
However, the audio files in the folder are all in .wav format.
Could you please help to check what's wrong with this?

답변(1개)

Walter Roberson
Walter Roberson 3 Mar 2021
Wav files permit a number of different codecs (algorithms for encoding data). The software used to decode is sort of like a plug-in, not necessarily present unless installed. Your Mac has the kind of codec software needed to read the files, but the other computer does not.
Sometimes it is easiest to use VLC to examine the file to find out the signature of the codec, which is a 4-letter code that indicates which codec is needed.
  댓글 수: 7
jibrahim
jibrahim 3 Mar 2021
Hi Zihui,
Can you try reading those wav files using audioread? It will be helpful to know if audioread errors out as well.

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

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by