This paper deals with design of an automatic detector for classification of selected cardiac arrhythmias. The proposed algorithms employ the continuous wavelet transform (CWT) combined with an analysis of its contour envelopes. The CWT was used in a detector of R-waves, to distinguish between normal and abnormal beats, and for detection of atrial premature contractions (APCs) and premature ventricular contractions (PVCs). The algorithm was validated by extensive testing on the MIT/BIH database. Searching for a local maximum in wavelet contour envelopes efficiently detects R- peaks. The overall accuracy of its detection tested on 48 half-hour signals is 99.5%. Two types of classifications were tested: 1. classification based on the contour envelope and the detection of significant points with overall accuracy 94.6%, 96.1% for the sinus rhythm (SR), 30.4% APCs, 71.2% PVCs and 2. the localization of maximum of square modulus of CWT coefficients in the area of QRS complex for the determination of PVCs between SR, right bundle branch block (RBBB), APC and other narrow complex arrhythmias with the accuracy 96.8%.