Since I couldn't find an audio sample for that specific clock tower, I downloaded another one from FreeSFX. I cut a shorter version of the sample, which can be played on repeated tolling. The full-length sample is always played last and has a nice long sustain.
A small Python script is started every half hour by the cron daemon. It checks what time it is and plays the corresponding number of samples. The first version had a bug that made the clock strike 13 times at high noon and midnight, but decided it's hilarious and left it in. So far nobody else seems to have noticed. Maybe I'm the only one counting strikes.
The script runs on our home server. It is connected to some Trust computer speakers from the previous century. One speaker sits in the cupboard with the server, the other one is patched over network cabling to the other side of the house. So wherever you are in the house, chances are you will hear the clock strike.
Guests sometimes are surprised at hearing our clock toll when there isn't a clock tower anywhere to be seen.
This code and article are released into the public domain. You can find code, samples and cronjob fragment in the downloads directory of this article.