python-soundfile icon indicating copy to clipboard operation
python-soundfile copied to clipboard

can't write an object of <class 'IPython.lib.display.Audio'> of type wav using soundfile.write

Open MagdyNasr41 opened this issue 3 years ago • 1 comments
trafficstars

I am trying to export <class 'IPython.lib.display.Audio'> to generate a .wav file and it gives me an error my code: audio_object= ipd.Audio(loaded_sound_file, rate = sampling_rate / sampling_rate_factor) // here i create the object soundfile.write('file_name.wav', audio_object, sample_rate) // here i try to export it

MagdyNasr41 avatar Nov 10 '22 10:11 MagdyNasr41

What's the error message? audio_object needs to be numpy array or similar.

bastibe avatar Nov 10 '22 12:11 bastibe