The present disclosure generally relates to a method, a device, and a computer-readable storage medium for detecting heart beats from cardiac signals whose quality, expressed in terms of signal amplitude and signal-to-noise ratio, varies dynamically in time.Hence, a method, a device, and a computer-readable storage medium for detecting electrical signals originating from a human or animal heart is proposed. The method includes the following steps:a) identifying an initial indication of the event in at least one of the signal channels,b) deciding whether or not the identified initial indication confirms the event depending on the quality of the signal channels in which initial indications are identified andc) determining a point-of-detection for the event depending on the quality of the signal channels and depending from the shape of the signal.