Hyundai – 2007 Santa Fe

The horn started interment blowing and then stopping, the door locks also are clicking. Is it the battery going bad or perhaps the electric key?