MATLAB: How to calculate rms of an audio file

rmsstereo audio

Having an audio file with unknown number of channels (may be stereo, may be mono), how do I calculate rms of each channel, please?

Best Answer

Signal = audioread(FileName);
RMS = sqrt(mean(Signal.^2, 1))