Commit 2eb963ab authored by Steve Tjoa's avatar Steve Tjoa Committed by GitHub

Merge pull request #36 from sudara/gh-pages

Fix librosa issues in Genre Recognition notebook
parents fddea7a2 ef2aad82
......@@ -10,7 +10,11 @@
"source": [
"%matplotlib inline\n",
"import seaborn\n",
"import numpy, scipy, matplotlib.pyplot as plt, sklearn, pandas, librosa, urllib, IPython.display, os.path\n",
"import numpy, scipy\n",
"import matplotlib.pyplot as plt\n",
"import sklearn, pandas\n",
"import librosa, librosa.display\n",
"import urllib, IPython.display, os.path\n",
"plt.rcParams['figure.figsize'] = (14, 5)"
]
},
......@@ -159,7 +163,7 @@
"outputs": [],
"source": [
"# See http://musicinformationretrieval.com/stft.html for more details on displaying spectrograms.\n",
"S_brahms = librosa.feature.melspectrogram(x_brahms, fs_brahms)"
"S_brahms = librosa.feature.melspectrogram(x_brahms, sr=fs_brahms)"
]
},
{
......@@ -202,7 +206,7 @@
}
],
"source": [
"librosa.display.specshow(S_log_brahms, fs_brahms, x_axis='time', y_axis='mel')"
"librosa.display.specshow(S_log_brahms, sr=fs_brahms, x_axis='time', y_axis='mel')"
]
},
{
......@@ -467,7 +471,7 @@
"outputs": [],
"source": [
"# See http://musicinformationretrieval.com/stft.html for more details on displaying spectrograms.\n",
"S_busta = librosa.feature.melspectrogram(x_busta, fs_busta)"
"S_busta = librosa.feature.melspectrogram(x_busta, sr=fs_busta)"
]
},
{
......@@ -510,7 +514,7 @@
}
],
"source": [
"librosa.display.specshow(S_log_busta, fs_busta, x_axis='time', y_axis='mel')"
"librosa.display.specshow(S_log_busta, sr=fs_busta, x_axis='time', y_axis='mel')"
]
},
{
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment