If you want to pay a visit to Taipei without jams, consider doing the trip on the recently opened high-speed rail line. It's 10 minutes by taxi to THSR Taoyuan station (or 15 min by half-hourly bus) and ~20 min to the city (NT$160 one way), with trains straight to Taipei Main Station roughly every half hour -- check schedules beforehand at
the THSR website. On your way back, note that not all trains stop in Taoyuan!