Medical apparatus includes an elongate probe for insertion into a body of a patient. The probe includes an ablation element and an acoustic transducer disposed at a distal end of the probe. An array of acoustic sensors is placed over the body. While the distal end of the probe is positioned in a target location in the body, a control unit drives the acoustic transducer in a training phase to emit an acoustic signal, receives electrical signals from the acoustic sensors in response to the acoustical signal, and processes the electrical signals so as to derive a phase profile focused at the target location. In an operational phase, the control unit drives the ablation element to ablate tissue in the body at the target location, and receives and filters the electrical signals from the acoustic sensors using the phase profile so as to detect acoustical activity at the target location.