From 78667b457a3150fc7e66677fa3497919b990266c Mon Sep 17 00:00:00 2001 From: Cristina Cochior Date: Mon, 8 Oct 2018 20:52:27 +0200 Subject: [PATCH] alarm time --- timer.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/timer.py b/timer.py index 7c6dc55..ee6a94c 100644 --- a/timer.py +++ b/timer.py @@ -1,8 +1,11 @@ -import time +import time +import random +import os -s = Sound() -s.read('') +nextturn=['who is next','next','well done','keep going','almost there', 'bonus! bonus! you have another minute', 'what a great edit', "it's like i'm reading The New York Times", 'nice phrasing. next'] while True: - time.sleep(60) - s.play() \ No newline at end of file + choice=random.choice(nextturn) + cmd="espeak '{}'".format(choice) + os.system(cmd) + time.sleep(60)