How to add a footstep sound to rigidbody fps controller without animations?

My player has a rigidbody fps controller from standard assets. I don’t have any animations or character. How can i add footsteps? I tried something like this. This doesn’t work properly.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FootStepController : MonoBehaviour
{
    //config params
    [SerializeField] GameObject Player;

    //params
    AudioSource audioSource;

    // Start is called before the first frame update
    void Start()
    {
        audioSource = GetComponent<AudioSource>();
    }

    // Update is called once per frame
    void Update()
    {
        if (Player.GetComponent<Rigidbody>().velocity.magnitude > Mathf.Epsilon) 
        {
            audioSource.Play();
        }
        else if (Player.GetComponent<Rigidbody>().velocity.magnitude == Mathf.Epsilon) 
        {
            audioSource.Stop();
        }
    }
}

I’ll try figuring it out, I’m new to unity, and I’m almost going to reach that step in my game, I’ll try to find out how.

bool isWalking; //true if im walking
float FootstepDelayTime;

    // Update is called once per frame
    void Start()
    {
        StartCoroutine(PlayFootsteps()); //Starts the coroutine below (basically a function)
    }

    IEnumerator PlayFootsteps()
    {
        Start: //loop

        if (isWalking == true) //check if im walking
        {
            audioSource.Play(); //play footstep sound (sound shouldnt really be longer than a second, just one footstep is enough)
            yield return new WaitForSeconds(FootstepDelayTime); //delay for a period of time
        }

        goto Start; //loop back to checking if im still walking
    }