An algorithm for the classification of the phonocardiogram (PCG) waveform is developed. Four main stages that are effective to detect the diagnostic features from PCG, are involved in this classification procedure. The segmentation of the primary heart sounds (PHS) is the first stage. By analysis of the dominant frequency peaks (DFPs), the PHSs are recognized accurately in the succeeding stage. A dynamic time warping (DTW) algorithm is used in the third stage to find the diagnostic features of the systole and diastole. In the last stage, click detection is performed by time series prediction. Based on the diagnostic features extracted by the above stages, the PCG can be easily interpreted by the tree-decision method. Ten PCGs are tested and it is shown that the classification method developed has a good performance.