how to differentiate the gnd audio to gnd of battery?
Do NOT use a diode.  Just connect the grounds together.

In a larger system with shielded wires and ground connections that really include a ground (earth ground, that is) connection things are more complicated.  

In your simple circuit all of the ground connections will be at the same potential, so just tie them together.

If you measure between the ground connections on the amplifier board, you will find that they are all connected together.  The - connections on the output side are a different thing.  The amplifier is a bridge amplifier, so the - side isn't ground.

Thanks to ricardomenzer for pointing out the bridge output of the amplifier.
That show once again that it is better for the question to include links to the datasheets.