The following is an excerpt from ArsGeek.
You can disable this by editing a file and entering two simple lines.
gedit /etc/modprobe.d/blacklist
And then add:
#silly speaker beep
blacklist pcspkr
Save your file and the speaker beep will be gone when you reboot.
If you don’t want to wait until a reboot, simply type:
sudo rmmod pcspkr