how to make an sliding sound effect?

I have my character slide along a wall kind of like in megaman X and I want it to make an sliding sound effect, the problem is that I can’t make it sound right, this is the code I’m using:

	public AudioClip resbaladizo;
	

	void Awake()
	{
		audio.clip = resbaladizo;

	}

 void OnCollisionStay (Collision lacolision) {
    		if(lacolision.gameObject.tag == "Player" && (lacolision.rigidbody.velocity.y<-5 ||  lacolision.rigidbody.velocity.y>5))
    		{
    			 			audio.Play();
    		
    		}}

As expected, the sound clip sounds every frame the character is in the wall so the one-second sliding sound effect sounds terrible as it is being re-played every frame. Anybody has a good solution for this? Thanks in advance!

Hello…

Check your sound setting loop is false and play on awake is true.

or else you can try this :

public boolean soundOnce = true;

void OnCollisionEnter(Collision collision) {
     if(soundOnce)
     {
            audio.Play();
            soundOnce = false;
     }
}

void OnCollisionExit(Collision collisionInfo) {
      soundOnce = true;
}

Thanks.

Thanks everyone. I actually solved the problem by using audio.isplaying in my condition and audio.stop in On CollisionExit. It kinda works now, thanks again!