我正在尝试完全在 python 中创建一个基于 espeak 的通话时钟
我想知道怎么跑
spk.speak('It is now <time>')
每次系统命中时间都是 12:00 1:00 等
请您参考如下方法:
import time
while True:
# sleep for the remaining seconds until the next hour
time.sleep(3600-time.time()%3600)
spk.speak('It is now <time>')
