Both optical sensors and contact mic's are often used for this by the professional calibration tools.
I would probably plan on using a contact mic inside the clock case to minimize outside noise interference. It is important to perform final adjustments with the works inside the case and the case carefully leveled in order to get the final accuracy needed, although with large case clocks this isn't always possible without some kind of portable device. One problem with an optical sensor is that it cannot help much with the first step and that is telling the difference between the 'tick' and the 'tock' sound. A clock that is not level or that has the internal linkage to the pendulum off-center will not perform as designed and be very hard to accurately set. Although a simple and inexpensive solution to this is to just use a cheap amplifier available from Radio Shack and use the ear as the calibration tool.
