Many models of smoke alarms chirp to indicate other erroneous conditions besides a weak battery. These situations include a battery failing to make a good connection, a dirty smoke alarm cover or that the smoke alarm needs to be reset.
New smoke alarms sometimes come with a battery pull-tab that separates the battery from the alarm, preventing battery discharge; leaving this pull-tab in sometimes causes the alarm to chirp. Additionally, not seating the battery properly or leaving the battery door open causes an error condition that makes the alarm chirp.
When no other situation applies, it is time to replace the smoke alarm. Smoke alarms should be replaced every 10 years.