Help with Importing .wav files with audioread and plotting spectrograms - Signal Processing

4 次查看(过去 30 天)
I am having trouble with understanding the units of a .wav file. I am doing an calibration experiment with my utrack24 recording system. I put a 500mV signal into the utrack and recorded it for about a minute. I loaded this .wav file into matlab and plotted the spectrogram with the code below. I'm trying to understand what the units are of the .wav file after I read it in with audioread. I understand it's normalized from -1 to 1. I believe I can use the 'native' command to keep the audioread input file the way it would normally be but I'm having trouble using that command correctly. Can someone help me understand what the units of this are and how to use the 'native' command when reading in the .wav file. I'm also wondering how to convert these input units of volts (?) to pressure. Thanks!
[x,fs]=audioread('Take1.wav');
dur=0.5;
winSize=round(fs*dur);
overlap=round(winSize/2);
fftsize=winSize;
figure
plot spectrogram(x(:,1),winSize,overlap,fftsize,fs,'yaxis')

回答(1 个)

Walter Roberson
Walter Roberson 2018-2-26
[x, fs] = audioread('Take1.wav', 'native');
However, the range of values you will get will depend on the characteristics of the analog to digital convertor, and there is a significant chance that what was recorded in the .wav file is not the original signal or not scaled or not centered the way the original signal was intended to be interpreted according to the analog digital convertor.
Unless you have more technical data, the best way to convert to volts is to calibrate the system.
". I'm also wondering how to convert these input units of volts (?) to pressure. "
That is a multi-step process in which you need to know several technical specifications. Unless you are wanting to get into modeling a/d convertors and microphones in theory and get rather involved, then I strongly recommend that you just calibrate the system end-to-end: put the microphone a careful distance from the speaker, have the speaker send out a known pressure, and measure the value you get in the wav file.
  8 个评论

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Time-Frequency Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by