Activate and deactivate sound when holding key

I’m trying to create a script that will play a sound only when HOLDING down a certain key, and then stop playing the sound when the key is released. I would do something similar to this:

function Update() {
     if(Input.GetKeyDown("l")) {
         if(audio.mute)
            audio.mute = false;
        else
            audio.mute = true;
    } 
}

but I’m not familiar with a script reference that has to do with holding a key down and then releasing it. All I would have is an audiosource that loops a sound, so it’s always on, but can only be heard when you unmute it while holding the key down, then muting it again when the key is released.

If you want to check if a key is held down, use Input.GetKey(), but to do what you want you can use something like:

function Update() {
	 if(Input.GetKeyDown("l"))
	     audio.mute = false;
	 if (Input.GetKeyUp("1"))
        audio.mute = true;
}