Environment effect on the acoustic vibration of metal nanoparticles