Clean up Rigel's tcp module

This commit is contained in:
Sameer Rahmani 2022-04-15 16:47:43 +01:00
parent 6bd67afb1a
commit d079d1c90e
1 changed files with 1 additions and 20 deletions

View File

@ -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):