Exemple #1
0
 def play(self, out_file):
     if self.out_file == '':
         self.out_file = 'temp.wav'
     a = play_wav.Sound()
     a.playFile(out_file)
     self.remove_file(self.out_file)
     del self.synth_params[:]
Exemple #2
0
    def play(self, outFile):
        ''' Open the .wav file and play it.'''

        if outFile == '':
            outFile = 'temp.wav'

        a = play_wav.Sound()
        a.playFile(outFile)
Exemple #3
0
#!/usr/bin/env python3

"""
  Tkinter Python egg timer

	Enter the number of minutes (or the alarm time as HH:MM)
	into the text entry and click the Start button
"""

import sys, time
from tkinter import *
import play_wav

wav = "Question.wav"
sound = play_wav.Sound()
run = False
curtime = 10
altime = time.time() + 1e8

def play_alarm():
	sound.playFile(wav)
	curtime = time.time() - altime
	tt.config(state = "normal")
	tt.delete(0, END)
	tt.insert(0, "−%u:%02u" % (curtime // 60, curtime % 60))
	tt.config(state="disabled")
	master.after(1200, play_alarm)

def start(s = ''):
	global run, curtime, altime