Why does the output of audioread() gives samples less than shown in audioinfo() ?

4 ビュー (過去 30 日間)
madhan ravi
madhan ravi 2022 年 1 月 31 日
コメント済み: Star Strider 2022 年 1 月 31 日

for some reason there is no problem in mac but in windows

  2 件のコメント
Star Strider
Star Strider 2022 年 1 月 31 日
Please post back here with their reply.
madhan ravi
madhan ravi 2022 年 1 月 31 日
編集済み: madhan ravi 2022 年 1 月 31 日
Thank you for the response @Star Strider, i would really appreciate if you could confirm if you face the same problem with the attached file.

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

採用された回答

Star Strider
Star Strider 2022 年 1 月 31 日
This is interesting!
The online Run feature computer uses Linux, and gives this result:
ZF = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/880055/VEHCar_Acceleration%20aston%20martin%20(ID%200600)_BSB.mp3.zip';
UZ = unzip(ZF);
ai = audioinfo(UZ{1})
ai = struct with fields:
Filename: '/users/mss.system.cVYhtd/VEHCar_Acceleration aston martin (ID 0600)_BSB.mp3' CompressionMethod: 'MP3' NumChannels: 1 SampleRate: 48000 TotalSamples: 315600 Duration: 6.5750 Title: [] Comment: [] Artist: [] BitRate: 320
[s,Fs] = audioread(UZ{1});
s_len = numel(s)
s_len = 314496
Windows 11 (run offlilne with the same code with R2021b) gives the following:
ai =
struct with fields:
Filename: 'C:\Users\vitha\Documents\MATLAB\FEF_Files\R & D\Answers & CSSM Problems\Temporary Projects\VEHCar_Acceleration aston martin (ID 0600)_BSB.mp3'
CompressionMethod: 'MP3'
NumChannels: 1
SampleRate: 48000
TotalSamples: 314496
Duration: 6.552
Title: []
Comment: []
Artist: []
BitRate: 320
s_len =
313968
I don’t have access to a Mac, so I have no idea what result it would give.
.
  6 件のコメント
madhan ravi
madhan ravi 2022 年 1 月 31 日
編集済み: madhan ravi 2022 年 1 月 31 日
Yes, for me using MATLAB is much easier so that I can analyse multiple signals within MATLAB environment.
Thank you once again @Star Strider for the help!
Star Strider
Star Strider 2022 年 1 月 31 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by