Error using audioDatastore/read (line 25)

2 ビュー (過去 30 日間)
Zihui Cai
Zihui Cai 2021 年 3 月 3 日
コメント済み: Walter Roberson 2021 年 6 月 29 日
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 2021 年 3 月 3 日
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.
  10 件のコメント
Abdul Gaffar
Abdul Gaffar 2021 年 6 月 29 日
audioread produces the same error as follows:
Error using audioread (line 104)
File could not be read due to an unexpected error. Reason: File contains data in an unknown format.
Error in Audio_Plot (line 5)
[y, Fs] = audioread('splat.wav'); % y samples from audio with Fs sampling frequency in [Hz].
Walter Roberson
Walter Roberson 2021 年 6 月 29 日
Please use a tool to identify the CODEC for your .wav file. You can find several listed at https://superuser.com/questions/72302/how-do-i-find-out-the-audio-format-of-a-wav-file/72340
Personally I find VLC to be useful to have around, so that is what I use.
Also, which operating system are you using?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by