if (audioSource.isPlaying) { //runs if audio is currently playing } if (!audioSource.isPlaying) { //runs if audio is not currently playing }