googlecreativelab / aiexperiments-drum-machine

Thousands of everyday sounds, organized using machine learning.
https://aiexperiments.withgoogle.com/drum-machine
Apache License 2.0
738 stars 118 forks source link

unclear how to generate metadata or make it optional #8

Closed EMCP closed 7 years ago

EMCP commented 7 years ago

So I'm trying to run the experiment with just 3-4 samples and some reference audio ... I've got it all hooked up in webpack but when I hit the front page it's getting stuck.

specifically here :

https://github.com/googlecreativelab/aiexperiments-drum-machine/blob/master/app/Data.js#L99

I saw a routine to generate metadata somewhere.. I'm guessing I'd need to run that? Best guess is this one ? https://github.com/kylemcdonald/AudioNotebooks/blob/master/Collect%20Metadata.ipynb

Edit : after re-reading my attempt at finding the routine, I realized I ran that and it doesn't add the needed metadata key to the JSON file(s)

Edit 2 : Ah, found what's going on in your readme.md

"JSON meta files for each of the audio chunks which included the position data, color data, analysis data and meta data (this is specific to our audio set which also included a lot of meta data tags)."

So if there's a way to ignore these metadata pieces easily let me know, meanwhile I'm going to attempt to cut them out since I don't have a corresponding set of JSON data. The color and position data is simply in the TSNE tsv files .. it shouldn't be in the JSON files correct? I ran everything and it never added that to a JSON file to my knowledge. Seems that script is missing to generate it.

Thanks

EMCP commented 7 years ago

So I'm begginning to see that I need to import a config file from the corresponding AudioNotebooks project

https://github.com/googlecreativelab/aiexperiments-drum-machine/blob/master/scripts/split.py#L19

However there's no mention of a config (other than in the AudioNotebooks/Sphinx to Samples.ipynb which feels unrelated )

Any pointers as to how to get this ? Guessing it's a calculation after you've generated the spritesheet ?

tambien commented 7 years ago

Each audio file also has meta data associated with it which we stored as JSON. That data included a few tags and a short description for each sound. We chunked the audio and meta data into audio spritesheets with corresponding meta data files using that split.py code.

EMCP commented 7 years ago

I got things working by disabling certain pieces of split.py , thank you!

Mostly had to remove anything involving the recommendation / ratings data, and site is now deployed and working!

EMCP commented 7 years ago

oh, just one last thing still puzzling me is where that config chunk config comes from.. because it's not anywhere in the AudioNotebook project (at least that I can find)

import json
import os
import numpy
import math
import re
from AudioNotebooks import config  // <------------- not seeing where this exists
tambien commented 7 years ago

hmmm. looks like that's just a file that we threw in there that might not be a part of the AudioNotebooks repo. Set seg_time to the length of your audio segments and num_chunks to the number of audio sprite sheets you want to generate. If you don't have many samples, i would recommend setting num_chunks to 1 to start.

EMCP commented 7 years ago

Thank you @tambien , CC @kylemcdonald ^^^ if you have this file would appreciate you or whomever uploading it

skabbit commented 7 years ago

There is more files missing :( https://github.com/googlecreativelab/aiexperiments-drum-machine/issues/10