I am looking for a good algorithm or a tool to compare two spectrogram outputs for unit testing. I can visually confirm the outputs are similar but I would like to automate this process. The basic stats of the outputs, such as min/max/avg/median are kind of the same but this would not catch true differences.
-
2$\begingroup$ A spectrogram is just a matrix. Have you considered one of the matrix difference metrics? $\endgroup$– MBazFeb 9 at 2:36
-
$\begingroup$ @MBaz what would be good metrics to compare two matrices? Like some kind of norm? $\endgroup$– Dilshod TadjibaevFeb 9 at 3:22
-
1$\begingroup$ If this is for subjective audio purposes (?), there are tools that effectively do something similar (pesq, peaq etc) $\endgroup$– Knut IngeFeb 9 at 6:25
-
2$\begingroup$ Unit testing must be based on the actual specification of the requirements. There is a huge span between "must be bit-exact" to "sounds more or less the same". Without a better description of your application what you consider a "pass" or "fail" $\endgroup$– HilmarFeb 9 at 8:05