I have a question about calculating the power and Energy of an audio recording.
I have imported a waveform of an audio recording in WAV format into Matlab and then calculated the energy and power in the time and frequency domain. Using Parseval's theorem, the energy in time and frequency is the same.
clear all; close all;
%Wav File einlesen und die Daten in data und Abtastrate in Fs
[data,Fs]=audioread('120A_v20_05s.wav'); %Ermittlung der Arraygröße
[nSamples,nChannels]=size(data); %Länge der Audiodatei ermitteln
waveFileLength=nSamples/Fs;
t=[0:length(data)-1] / Fs;
%Signal darstellen figure
plot(t,data)
ylim([-0.3 0.3])
title('120A v20')
grid on xlabel('Zeit')
label('X(t)')
E1_timedomain=sum(abs(data.^2)); % Energy time domain
L=length(data);
Ptime=(norm(data)^2)/L; % Power time domain
y = fft(data);
Pfrequ=sum(y.*conj(y))/(L^2); %Compute power with proper scaling.
E1_frequdomain=sum(abs(y.^2))/nSamples; % Energy frequency domain
E1_timedomain = 4.003 Ptime = 1.8154e-04
My question is which units have the energy and power in this case? Joule and Watts or do I have to consider a factor?
Many Thanks! Greetings Mathias