Per il beep, potresti mettere semplicemente dentro l'if, un embed html con il richiamo ad un file audio che riproduce il beep una sola volta