Pulseaudio audio problems
I had the same and was able to fix it. It may be related to speech-dispatcher (some text-to-speech utility), so you can try:
killall speech-dispatcher
If the sound comes back to normal you can remove it completely (if you don't need it) with:
sudo apt remove speech-dispatcher
Don't forget to restart your web browser.
source: https://tqdev.com/2021-firefox-ubuntu-crackling-sound