Error using audioDatastore/read (line 25)
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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?
0 commentaires
Réponses (1)
Walter Roberson
le 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.
10 commentaires
Abdul Gaffar
le 29 Juin 2021
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
le 29 Juin 2021
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?
Voir également
Catégories
En savoir plus sur Audio and Video Data dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!