current browsers disallow JS to play a sound unless the user interacted with the page first. See https://developers.google.com/web/updates/2017/09/autoplay-policy-changes