Issue
I use IPython.display for listening audio file in Jupyter notebook. I have a long file(30 min).
import IPython.display as dis
import numpy
y = numpy.zeros(30*60*48000)
This code work as fluidly for 5 seconds
dis.display(dis.Audio(y[:5*48000], rate=48000))
but for 30 minutes the code hangs and there are no errors.
dis.display(dis.Audio(y, rate=48000))
Is this method not suitable for displaying long audios and is it limited? Is there another way to display long files?
Solution
You can use pydub library:
from pydub import AudioSegment
audio = AudioSegment.from_wav("your_audio.wav")
audio
Answered By - korovsky
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.