Apparatus and method are provided to collect and analyze phonocardiogram (PCG) an electrocardiogram (ECG) waveforms. In one novel aspect, the PCG and ECG waveforms are collected from wearable devices. In one embodiment, the wearable device collects heartbeat waveforms by attaching the device to the patient for a long period and sends the collected waveforms to a receiver through a wireless network. In one embodiment, an acoustic seal layer is attached to the wearable device to reduce the body movement noises and environmental noises. In another novel aspect, an analysis method compares received patient's current PCG/ECG waveform with historic data. In one embodiment, the historic data are stored in a cloud-based database.