How to smoothly turn on and off audio with keys

okay so I have a script to turn on / off sound when pressing w,a,s,d but I would like the volume to increase when pressing and decrease when released until quiet.

I have this script which I pair with an audio source.

function Update() 
 {
  if ( Input.GetButtonDown( "Horizontal" ) || Input.GetButtonDown( "Vertical" ) )
        audio.Play();
    else if ( !Input.GetButton( "Horizontal" ) && !Input.GetButton( "Vertical" ) && audio.isPlaying )
        audio.Stop(); // or Pause()
  }

you’ll need to increment audio.volume += 0.1f or something