I need to detect two sounds (913 Hz and 1370 Hz), knowing the time in which each starts and ends.

At this time, I am using a band pass filter (butter), and this is the result:

[![First image is the original signal, second is after a bpf at 913Hz (window=150 Hz)](https://i.stack.imgur.com/KEmYj.png)](https://i.stack.imgur.com/KEmYj.png)

Here is the first time this sound occurs:

[![First time the sound at 913 Hz occurs](https://i.stack.imgur.com/DgqTc.png)](https://i.stack.imgur.com/DgqTc.png)

The red line is where the sound is supposed to end (276 ms).

So how can I detect that the first time the tone occurs it starts at 0 ms and ends at 276 ms?