0
我創建了一個具有特定條件的定時器,當它用完時,它應該釋放一個音頻。音頻發佈定時器
我輸入:
import time
import playsound
run = raw_input("Start? > ")
mins = 0
# Only run if the user types in "start"
if run == "start":
# Loop until we reach 2 minutes running
while mins != 2:
print ">>>>>>>>>>>>>>>>>>>>>", mins
if mins ==2:
playsound.playsound('C:\Audio.mp3', True)
time.sleep(60)
# Increment the minute total
mins += 1
但可悲的是它不釋放任何
你爲什麼不只是睡眠120秒,然後播放的聲音? – Bhupen