Horrible footstep looping problem

Hi,
I’m trying to play random footsteps at normal intervals but each time I move in my game I can hear a strange looping sound like if the random sounds were playing non-stop. I can’t find the solution to my problem. Help would be greatly appreciated, thanks.

var audioSources : AudioClip[];
 
function Walk()
{
    if ( Input.GetAxis( "Horizontal" ) || Input.GetAxis( "Vertical" ) )
    {
	yield WaitForSeconds (1);
    var nextClip = audioSources[Random.Range(0, audioSources.Length)];
    audio.clip = nextClip;
    audio.Play();
}
}

function Update() 
{
    Walk();
}

Here is my code for this. Hope it helps

void Update ()
{
	if(Input.GetKey(KeyCode.W) ||
	   Input.GetKey(KeyCode.A) ||
	   Input.GetKey(KeyCode.S) ||
	   Input.GetKey(KeyCode.D))
	{
		if(!audio.isPlaying) audio.Play();
	}
	else
		audio.Stop();
}

Tweaking a little your script:

 var audioSources : AudioClip[];
    var playStep : boolean;
    
    function Walk()
    {
        if ( ( Input.GetAxis( "Horizontal" ) || Input.GetAxis( "Vertical" ) ) && playStep )
        {
        playStep = false; // to disallow repeating the steps to often
    
        var nextClip = audioSources[Random.Range(0, audioSources.Length)];
        audio.clip = nextClip;
        audio.Play();
        yield WaitForSeconds (1);
        playStep = true; // now you can allow to play next step
    }
    }
    
    function Start () {
    
    playStep = true; // to allow the first step to play
    
    }
    
     
    function Update() 
    {
        Walk();
    }