diff --git a/rigel/tcp.py b/rigel/tcp.py index 5301d2f..8071ec7 100644 --- a/rigel/tcp.py +++ b/rigel/tcp.py @@ -30,33 +30,14 @@ def to_wav_data(wav): def play(wav): - #p = pyaudio.PyAudio() + try: - # open stream - # stream = p.open(format=p.get_format_from_width(wav.getsampwidth()), - # channels=wav.getnchannels(), - # rate=wav.getframerate(), - # output=True) - # stream = p.open(format=pyaudio.paInt16, - # channels=1, - # rate=22050, - # output=True) - - # stream.write(to_wav_data(wav)) - - # # stop stream - # stream.stop_stream() - # stream.close() - # close PyAudio - # Start audio play = sa.play_buffer(to_wav_data(wav), 1, 2, 22050) - # Wait for audio playback to finish before exiting play.wait_done() finally: play.stop() - #p.terminate() def synth(config):