Issue
could anyone please tell me what I did wrong? I am very new with audio processing using python. IPython.display doesn't load the song. There is no duration for the song. Pls see below. I first imported a bunch of stuff.
from IPython.display import Audio
import IPython.display as ipd
import librosa
import librosa.display
from scipy.io.wavfile import write
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
then I tried to load the song
ipd.Audio('/Users/wjz/Downloads/sweetdreams.mp3', autoplay=True)
but it just doesn't do it. Thanks for your help.
Solution
I will give you only troubleshooting advice, since this depends on a file you have in your machine.
open(path).close();
This will fail if the file does not exist and is readable. If it works, it will close the file immediately, so that it doesn't block the next attempt to use.
Install librosa
, if you still don't have it, and run
import librosa;
librosa.load(path)
If this fails, it means that the file is corrupted or not widely supported.
Answered By - Bob
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.