Data returned by Audioread

5 次查看(过去 30 天)
Afnan H.
Afnan H. 2017-5-25
评论: Jan 2017-5-29
I have a question regarding the audioread function in Matlab. Audioread('file.wav') will return a normalized data of -1 to 1 that represents the amplitude of the sound. My question is, Are sensors (ex. Mica2) when acquire a sound signal and after doing the AD sampling will give me the same samples data that i'll get using Audioread?

回答(1 个)

Star Strider
Star Strider 2017-5-25
The audioread function will read a previously-recorded audio file, so it will not itself record data from a sensor. You first have to record the data from your sensor and then play it through audioread.
See the documentation for audiorecorder (link) if you want to record sound directly from a sensor that your operating system and MATLAB support.
  13 个评论
Walter Roberson
Walter Roberson 2017-5-29
The normalization is according to what the internal data type can hold, not according to the stored range of data.
Jan
Jan 2017-5-29
@Walter: Thanks. Ah, I think I get is slowly: When the signal is stored as int16, the values -32768 and 32767 are scaled to [-1, +1 - e] (with a tiny e such that 0 is still 0 inspite of the tiny asymmetry). And if the maximum value is 17, the output of audioread will be 17/32768.
This means that audioread scales the range, but not the actual signal. Then "normalized values between −1.0 and 1.0" is misleading, at least for me. I ask TMW if they could improve the help text.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Audio 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