How to make sounds louder if I go faster

How can I make a sound play when I move. And have it speed up when I go faster.

Got a lot of way to do it, but the highest volume for the audio source is 1 only, unless you use audio mixer to further increase the max volume.

If you using audio source, first you need to get your current speed value first, then update the volume on the Audio Source component, but u need to make sure the value is between 0 to 1 float value

Example:

private AudioSource audioSource;
    
void Start(){
    
        audioSource = GetComponent<AudioSource>();

}

void Update(){

      UpdateSound();

}   

void UpdateSound(){
       
      audioSource.volume = Mathf.InverseLerp(0f, maxSpeed, currentSpeed);
    
}