In order to fix the latency problem, I created a buffer function which downloads all of the files into the users cache then I can call the sounds as many times as needed without having to downloading them any duplicate times thus stopping the latency issue I was previously experiencing.
If I have time later I plan to pass the mass of the collision object as a parameter of the play sound function. With this parameter I could then control to pitch value of the sound through another node, which will give the user indication of the size of the object they have collided with through sound.
Over all I am happy with how my sounds are working. I am not so happy with the setTime function I’ve used to call my ambient track a couple of seconds after initialisation. If the user has a slow internet connection then the sound may still not have loaded by the time the timeout function is called so the track may not play.
I am going to look into creating a loading screen, which will load my sound and image files before the user can initiate my project.