Alert sounds on iMac
To start with I would boot into Safe Mode as a troubleshooting step to see if that makes any difference.

Boot into Safe Mode

Follow these steps to boot your Mac into Safe Mode:


Fully shut down your iMac
Restart your iMac
Immediately press the Shift key and keep it down 
Let go of the Shift key when you see the login window (NOTE: If you have FileVault enabled you may need to log in twice).
Take a note of what happens (i.e. does it still beep every 30s in Safe Mode)
Exit Safe Mode by restarting your iMac as normal
Test again to see if the beeps continue 


Let me know how it went and we'll go from there.