Sounds triggering too fast

So, I’ve posted about this before, but I’ve tried every suggestion I’ve been given with the same issue always arising so I feel like something is just missing from the code at this point. I have a walking sound array being triggered by the arrow keys when I press them down, the sound clips in the array will change depending on which kind of surface (ex. wood, grass, dirt, etc.) my character is on and I have the sounds being changed via OnCollisionColliderHit using tags as a reference point for the change. Everything is being triggered on the right surfaces but the only issue is that the sound is being called every frame-ish. I don’t have anything in the Update function so not sure what’s going on. I’m still quite new to scripting so apologies if I’m making a rookie mistake.

using UnityEngine;
using System.Collections;

public class WormWalk : MonoBehaviour 
{
	public AudioSource Audio;
		
	public AudioClip[] walkingSounds;
	
	public int pitchRandomness = 1;
	
	// Use this for initialization
	void Start () 
	{
		Audio = (AudioSource)gameObject.GetComponent ("AudioSource");
	}
	
	
	// Update is called once per frame
	void Update () 
	{
		
	}
	
	void OnControllerColliderHit(ControllerColliderHit hit)
	{
		if(Input.GetButton("Horizontal") || Input.GetButton("Vertical"))
		{
			Audio.Play();
		}
		else
		{
			Audio.Stop ();
		}
		
		if (hit.gameObject.tag == "groundFloor")
    	{
    		print("Ground");
    		Audio.clip = walkingSounds[0];
    	}

    	if (hit.gameObject.tag == "woodFloor")
    	{
    		print("Wood");
    		Audio.clip = walkingSounds[1];
    	}
    
    	if (hit.gameObject.tag == "stoneFloor")
    	{
    		print("Stone");
    		Audio.clip = walkingSounds[2];
    	} 
    
    	if (hit.gameObject.tag == "templeFloor")
    	{
    		print("Temple");
    		Audio.clip = walkingSounds[3];
    	}
	}
}

try this

 if(Input.GetButton("Horizontal") || Input.GetButton("Vertical"))
{
Audio.Play();
}
else if(Input.GetButtonUp("Horizontal") || Input.GetButtonUp("Vertical"))
{
Audio.Stop ();
}

Audio.pitch = (1);
Apparently audio.pitch changes the speed of your sound, so try altering it to below your pitch to see if it plays correctly.

It looks like OnControllerColliderHit is being called repeatedly.

Maybe just run Audio.Play() each time the clip is changed.

public AudioClip prevAudio = null;

// for each instance where you assign Audio.clip

prevAudio = Audio.clip;
Audio.clip = xxxxxxxxx;


if (prevAudio!=Audio.clip) {
    Audio.Play();
}
else {
    prevAudio = null;
    Audio.Stop();
}

I too agree, as loboclerk suggested, that the audio is being called repeatedly. If this is the case then perhaps try using a bool to prevent the audio from playing if it is already in the process of playing. A .cs and .js of this can be found in a similar post here: