How to calculate the similarity of two electric waves
You could measure the Cross-Correlation between the two signals.  

Here's an almost identical thread, with a filling answer:

How do I implement cross-correlation to prove two audio files are similar?

Some general info on cross-correlation from wiki:
https://en.wikipedia.org/wiki/Cross-correlation

Hope that helps.