Detection of sharp peaks in an audio signal I have an audio signal and I'm interested to detect the very sharp peaks.



If I zoom, here is something that should NOT be detected (this is voice actually):


NO GOOD

Here is something that should be detected:


GOOD

Ideally, a CNN with some training would be the best solution but I'm too limited in terms of computation to run it.

So, I'm looking for an easy solution with a simple signal processing algorithm (filters and others things).

I have already developed a simple algorithm based on the maximum of a 10ms window and if I see that the maximum is low, then suddenly very high, and then low again, I have a detection.

But it's not outstanding. Any better idea? Is there any filter that can find me "sharp" peaks?
"Sharp peaks" in the time domain translates to high frequency content. Your simple algorithm of min and max values would be improved by first passing your data through a high pass filter - otherwise slow (low frequency) rumbles could degrade your detection methods.

To take your solution to the next level, you should use an "onset detection" algorithm. These are well studied. A recommended paper to start is:

A Tutorial on Onset Detection in Music Signals - Juan Pablo Bello et al, September 2005.