p = pyaudio.PyAudio()
stream = p.open(format=p.get_format_from_width(2), channels=1, rate=44100,
    output=True)
stream.write(input_array)
stream.stop_stream()
stream.close()
p.terminate()
Playing a sound from a wave form stored in an array