Tuesday, January 4, 2011

Recording audio ; windows

from Tkinter import *
root = Tk()

import tkSnack
tkSnack.initializeSnack(root)
import time
f=open("E:\\record.wav","wb")
f.close()

r=tkSnack.Sound(file='e:/record.wav',frequency=11025,channels=1)
r.record(fileformat="WAV")

import threading

def pause():
    r.stop()
    print "Recording over"
   
t=threading.Timer(120.0,pause)
t.start()

No comments:

Post a Comment