Trying to play sound when Sprite bounces

So I am making a game where the character would collide with a square then bounce off it. However I wanted to add a AudioSource for the bounce effect. I am getting 0 errors in the Console window however my code isn’t working.

#pragma strict

function OnCollisionEnter2D (collision : Collision2D)
{
	audio.Play();
}

first, you need to tell us what game object you have the script on. The object? or the player?

if it is on the object, do something like this:

function OnCollisionEnter2D(coll : Collision2D){
  if(coll.gameObject.name == "Player"){
    audio.Play();
  }