MATLAB Answers

Why does .m4a audio file (imported via audioread) get stored in workspace with two data series/data columns instead of just one?

1 ビュー (過去 30 日間)
Johannes Stache
Johannes Stache 2021 年 9 月 11 日
コメント済み: Rik 2021 年 9 月 12 日
Hi all,
i imported an .m4a audio file with following command: [yh fs]=audioread('background_noise.m4a').
Looking now in my workspace my data (yh) is stored as a 46080x2 double. Now i know that 46080 are my samples (nothing special) but I am wondering why my audio data is stored in two columns with slightly different values instead of just one column? I mean it is "just" an audio file, isn't it?
Can someone please tell me why that is and what information I get out of this?
I would be super happy for a quick reply/answer!
Best regards,
Johannes

回答 (1 件)

Stephen
Stephen 2021 年 9 月 11 日
編集済み: Stephen 2021 年 9 月 11 日
Clearly your audio file has two channels. The MATLAB documentation states that the first output is "... returned as an m-by-n matrix, where m is the number of audio samples read and n is the number of audio channels in the file."
  4 件のコメント
Rik
Rik 2021 年 9 月 12 日
Unless you have actual stereo sound, it is very possible the difference between the two signals is very close to the measurement error. It might be helpful (depending on what exactly you're looking at) to process them independently and compare the results.
Some audio setups will also just duplicate their mono sound and store it as stereo, although your setup apparently does have true stereo.

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

Community Treasure Hunt

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

Start Hunting!

Translated by