Medical apparatus includes an elongate probe forinsertion into a body of a patient. The probe includesan ablation element and an acoustic transducer disposedat a distal end of the probe. An array of acousticsensors is placed over the body. While the distal end ofthe probe is positioned in a target location in the body,a control unit drives the acoustic transducer in atraining phase to emit an acoustic signal, receiveselectrical signals from the acoustic sensors in responseto the acoustical signal, and processes the electricalsignals so as to derive a phase profile focused at thetarget location. In an operational phase, the controlunit drives the ablation element to ablate tissue in thebody at the target location, and receives and filters theelectrical signals from the acoustic sensors using thephase profile so as to detect acoustical activity at thetarget location.