iranroman / musicinformationretrieval.com

Instructional notebooks on music information retrieval.
http://musicinformationretrieval.com
MIT License
1.23k stars 414 forks source link

Google Collab #57

Open johntheo opened 3 years ago

johntheo commented 3 years ago

Is there any interest to put this content available on google collaboratory for easy run?

brunoimbrizi commented 1 year ago

@stevetjoa I'd like to help with updating the notebooks to run online on Google Colab. I have a few suggestions, whcih I tried to capture in the screen recording below:

https://user-images.githubusercontent.com/880280/236423528-7d07ad4e-7b60-4f37-8107-dc04c2ab810a.mp4

  1. Skip stanford_mir. Even when fetched from the repository with wget it throws an error on init(). The notebook seems to run just fine without it
    # import stanford_mir; stanford_mir.init()
  2. Add a line of code to fetch the audio file referenced in the notebook i.e.
    # On Google Colab run this to fetch the audio file
    !wget -P "audio" "https://github.com/stevetjoa/musicinformationretrieval.com/raw/gh-pages/audio/simple_loop.wav"
  3. Replace librosa.display.waveplot with librosa.display.waveshow
    librosa.display.waveshow(x, sr=sr)

I used ipython_audio.ipynb only as an example. If you like my suggestions, I can to submit a PR with similar updates applied to all other files. I just think the repo is great and I'd be happy to contribute.