audio = IPython.display.Audio(waveform, rate=sample_rate, autoplay=True) with open(f"{output_wav}.wav", "wb") as f: f.write(audio.data)