def recordplay(): recorder = RecordWave() recorder.record_to_file('demo.wav') a = AudioFile("demo.wav") a.play()
def play(self): self.write("out.wav") a = AudioFile("out.wav") a.play() a.close()