Recording sound

#Recording sound

import audio, appuifw

def stop():
    global s
    s.stop()
    s.close()
    appuifw.app.exit_key_handler=stop

#Open a new file for recording
s=audio.Sound.open("C:\\recorded.amr")

#Start recording
s.record()