I'm trying to use the pyAudioAnalysis library to pull features from mp3 files. The problem I'm having is that I can't get my Jupyter Notebook to find eyed3, which is essential for the library. Here's my code :
from pyAudioAnalysis import audioBasicIO
from pyAudioAnalysis import audioFeatureExtraction
import matplotlib.pyplot as plt
[Fs, x] = audioBasicIO.readAudioFile("/Users/Kyle/Downloads/sample.rickyxsan - Insane.mp3");
F = audioFeatureExtraction.stFeatureExtraction(x, Fs, 0.050*Fs, 0.025*Fs);
plt.subplot(2,1,1); plt.plot(F[0,:]); plt.xlabel('Frame no'); plt.ylabel('ZCR');
plt.subplot(2,1,2); plt.plot(F[1,:]); plt.xlabel('Frame no'); plt.ylabel('Energy'); plt.show()
When I run that I get this error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-6-d4b751ae9dc8> in <module>()
1 # GETTING FEATURES
2
----> 3 from pyAudioAnalysis import audioBasicIO
4 from pyAudioAnalysis import audioFeatureExtraction
5 import matplotlib.pyplot as plt
/Users/Kyle/Documents/School/Projects/SoundcloudProject/Tools/pyAudioAnalysis/audioBasicIO.py in <module>()
----> 1 import os, glob, eyed3, ntpath, shutil, numpy
2 import scipy.io.wavfile as wavfile
3 import pydub
4 from pydub import AudioSegment
5
ImportError: No module named eyed3
When I try "sudo pip install eyed3", I get this output:
Requirement already satisfied: eyed3 in /anaconda/lib/python3.5/site-packages
Requirement already satisfied: six in /anaconda/lib/python3.5/site-packages (from eyed3)
Requirement already satisfied: python-magic in /anaconda/lib/python3.5/site-packages (from eyed3)
Requirement already satisfied: pathlib in /anaconda/lib/python3.5/site-packages (from eyed3)
And when I try "brew install eyed3", I get this:
Warning: git-2.11.0 already installed, it's just not linked.
Error: Git must be installed and in your PATH!
Warning: eye-d3-0.7.8 already installed
It really seems like eyed3 is already installed, but I'm not sure how to get my notebook to find it.