add debounce and timeouts for sound detection routine