Audio File Code

I have an audio on my site, but I wanted to know if it is possible to script it so it would play automatically.

It depends on the browser. Some bowsers (especially for mobile devices) prevent auto-playing.
You can try:

$w.onReady(() => {
$w("#audioPlayer1").play();
})