Data returned by Audioread

5 vues (au cours des 30 derniers jours)
Afnan H.
Afnan H. le 25 Mai 2017
Commenté : Jan le 29 Mai 2017
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?

Réponses (1)

Star Strider
Star Strider le 25 Mai 2017
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 commentaires
Walter Roberson
Walter Roberson le 29 Mai 2017
The normalization is according to what the internal data type can hold, not according to the stored range of data.
Jan
Jan le 29 Mai 2017
@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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Audio I/O and Waveform Generation 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!

Translated by