Disclosed are two embodiments of a circuit for analyzing the ECG signals of a heart and for delivering a cardioverting pulse of energy to the heart if the heart is in an arrhythmic state in need of cardioversion. In the first embodiment, the ECG is filtered by a high pass filter to provide the derivative of the ECG, is reviewed by a window detector to determine the average time that the input ECG spends at high slope, and then the average occurrence of high slope segments is compared with a predetermined reference to determine whether the ECG is normal. Cardioversion is effected if the ECG is abnormal. In the second embodiment, an absolute value circuit and a level comparator is used in place of the window detector. The input ECG is normalized by an automatic gain control where the AGC voltage is derived from the ECG signals after high pass filtration.