Can "audioread" read mp3 file correctly?

9 ビュー (過去 30 日間)
S Lai
S Lai 2020 年 1 月 17 日
回答済み: Kaashyap Pappu 2020 年 1 月 21 日
I use the code
[y,Fs]=audioread('**.mp3','double');
to read a mp3 file. and size(y) is [12762480 2] (two channels).
But foobar tells me that the sample is 12 759 666. They are different, which one is correct?

回答 (1 件)

Kaashyap Pappu
Kaashyap Pappu 2020 年 1 月 21 日
The variation could be due to the limitation highlighted here. There are instances when the software and hardware specifications also play a role in how many samples would be output when ‘audioread’ is called. This can be mainly attributed to MP3 compression not having a fixed bits per sample ratio. However, this does not mean that the samples are incorrect. The sound function can be used to verify if the original audio is still intact.
Hope this helps!

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by