internetarchive / internet-archive-voice-apps

Voice Apps (Actions on Google, Alexa Skill) of Internet Archive. Just say: "Ok Google, Ask Internet Archive to Play Jazz" or "Alexa, Ask Internet Internet Archive to play Instrumental Music"
46 stars 42 forks source link

random playback of free music archive (FMA) #396

Open hyzhak opened 5 years ago

hyzhak commented 5 years ago

Collection https://archive.org/details/freemusicarchive

hyzhak commented 5 years ago

FMA album's metadata doesn't have subject field, and any other which reflect genre of music

There is only 1 "album" with "subject" metadata field https://gactions-api.archive.org/advancedsearch.php?q=_exists_:subject%20AND%20collection:freemusicarchive&fl%5B%5D=identifier,coverage,title,year,subject&sort%5B%5D=random&rows=2&output=json

returns:

{
  "responseHeader": {
    "status": 0,
    "QTime": 11,
    "params": {
      "query": "_exists_:subject AND collection:freemusicarchive",
      "qin": "_exists_:subject AND collection:freemusicarchive",
      "fields": "identifier,coverage,title,year,subject,files",
      "wt": "json",
      "sort": "random",
      "rows": "2",
      "start": 0
    }
  },
  "response": {
    "numFound": 1,
    "start": 0,
    "docs": [{
      "identifier": "OnwardUpward-13786",
      "subject": ["Electronic", "Experimental", "Ambient", "Electronic", "Glitch"],
      "title": "Onward&Upward",
      "year": "2013"
    }]
  }
}

But FMA albums have metadata field "genre" in files https://archive.org/metadata/OnwardUpward-13786

 {
  "created": 1545146261,
  "d1": "ia601704.us.archive.org",
  "d2": "ia801704.us.archive.org",
  "dir": "/2/items/OnwardUpward-13786",
  "files": [{
    "name": "OnwardUpward-13786.jpg",
    "source": "original",
    "format": "JPEG",
    "mtime": "1364851593",
    "size": "299377",
    "md5": "ee9de190a904273c3b3d36736f81bc77",
    "crc32": "bbd38f94",
    "sha1": "0de89724cb408e9e0ca8e487f3633f9d5f0564b3",
    "rotation": "0"
  }, {
    "name": "OnwardUpward-13786_archive.torrent",
    "source": "metadata",
    "btih": "eea3e4b547358ec5c223083bf8144987dd95bec2",
    "mtime": "1542150205",
    "size": "7318",
    "md5": "69e5c64ca49ac3ead4b968ee9cc301e3",
    "crc32": "2ce9bef6",
    "sha1": "49f7f7af1fe0aaa92143729d024ded0e97591d39",
    "format": "Archive BitTorrent"
  }, {
    "name": "OnwardUpward-13786_files.xml",
    "source": "metadata",
    "format": "Metadata",
    "md5": "991ec56a2ee69db3f7a3cfe089b02487"
  }, {
    "name": "OnwardUpward-13786_meta.xml",
    "source": "metadata",
    "format": "Metadata",
    "mtime": "1542150201",
    "size": "1197",
    "md5": "23102528a20955270d4c6e9aab37ebb6",
    "crc32": "16c03756",
    "sha1": "db2c04b4e816241454196748421223e70350cad5"
  }, {
    "name": "OnwardUpward-13786_thumb.jpg",
    "source": "derivative",
    "format": "JPEG Thumb",
    "original": "OnwardUpward-13786.jpg",
    "mtime": "1364926468",
    "size": "4827",
    "md5": "399a78c40a2bef7be08a56e020eaf2e7",
    "crc32": "dc3a4515",
    "sha1": "388c7d677874b8c312f8da4a3c25f301ffe386ec"
  }, {
    "name": "__ia_thumb.jpg",
    "source": "original",
    "mtime": "1542150201",
    "size": "13456",
    "md5": "795464bb24df2b896e793b7bff693fde",
    "crc32": "b8d164a4",
    "sha1": "abe2ff5aeb5d976be4181778b0e76a014b39bee6",
    "format": "Item Tile",
    "rotation": "0"
  }, {
    "name": "junior85_-_01_-_Onward.mp3",
    "source": "original",
    "format": "VBR MP3",
    "length": "923.27",
    "mtime": "1364851590",
    "size": "36930928",
    "md5": "be2b7d059cb9f277d11f7a3a09915757",
    "crc32": "7fce2364",
    "sha1": "b74d01e2c79c4c556e6210e669196c90a2ed730b",
    "title": "Onward",
    "artist": "junior85",
    "track": "1",
    "album": "OnwardandUpward",
    "genre": "Electronic",
    "external-identifier": "urn:acoustid:unknown",
    "height": "0",
    "width": "0",
    "creator": "junior85"
  }, {
    "name": "junior85_-_01_-_Onward.ogg",
    "source": "derivative",
    "format": "Ogg Vorbis",
    "original": "junior85_-_01_-_Onward.mp3",
    "mtime": "1364926435",
    "size": "12119068",
    "md5": "e5081cbd973ac48a535ca0bba45bc403",
    "crc32": "27e3982b",
    "sha1": "5eaaeb898786d30cf76bb0b1f152c64b4994ea17",
    "length": "923.17",
    "height": "0",
    "width": "0"
  }, {
    "name": "junior85_-_01_-_Onward.png",
    "source": "derivative",
    "format": "PNG",
    "original": "junior85_-_01_-_Onward.mp3",
    "mtime": "1414491659",
    "size": "7766",
    "md5": "6649fd83ffe8d898bfec50df23926143",
    "crc32": "f07d00ea",
    "sha1": "1537946a5d949ea3d749002b742f8cc4ba730e8d"
  }, {
    "name": "junior85_-_02_-_Upward.mp3",
    "source": "original",
    "format": "VBR MP3",
    "length": "304.88",
    "mtime": "1364851552",
    "size": "12195058",
    "md5": "689ac0cf1cb4bca660886a3bc19b2587",
    "crc32": "879034a1",
    "sha1": "acfc672c68313b63906620868e5b9fc977dbfe10",
    "title": "Upward",
    "artist": "junior85",
    "track": "2",
    "album": "OnwardandUpward",
    "genre": "Other",
    "external-identifier": "urn:acoustid:unknown",
    "height": "0",
    "width": "0",
    "creator": "junior85"
  }, {
    "name": "junior85_-_02_-_Upward.ogg",
    "source": "derivative",
    "format": "Ogg Vorbis",
    "original": "junior85_-_02_-_Upward.mp3",
    "mtime": "1364926446",
    "size": "3613728",
    "md5": "fbfc3d6502ed13e66bd6755d5598567c",
    "crc32": "1f0f74a5",
    "sha1": "83106780af0c4d3909e05c1cbbddccb3ddf7b9a0",
    "length": "304.77",
    "height": "0",
    "width": "0"
  }, {
    "name": "junior85_-_02_-_Upward.png",
    "source": "derivative",
    "format": "PNG",
    "original": "junior85_-_02_-_Upward.mp3",
    "mtime": "1414491713",
    "size": "10869",
    "md5": "866a1be1f5131ca9228a9f88ffd86c3b",
    "crc32": "d3338530",
    "sha1": "66935ce0f05ccfde75741965dc765130af6846a3"
  }, {
    "name": "junior85_-_03_-_OnwardUpward.mp3",
    "source": "original",
    "format": "VBR MP3",
    "length": "675.27",
    "mtime": "1364851562",
    "size": "27010667",
    "md5": "a731600ada95c82cc98dba52ce1ec925",
    "crc32": "99e2bf65",
    "sha1": "072ad3e862d06f72415048c4c8c41c243c79d788",
    "title": "OnwardandUpward",
    "artist": "junior85",
    "track": "3",
    "album": "OnwardandUpward",
    "genre": "Other",
    "external-identifier": "urn:acoustid:unknown",
    "height": "0",
    "width": "0",
    "creator": "junior85"
  }, {
    "name": "junior85_-_03_-_OnwardUpward.ogg",
    "source": "derivative",
    "format": "Ogg Vorbis",
    "original": "junior85_-_03_-_OnwardUpward.mp3",
    "mtime": "1364926467",
    "size": "8240393",
    "md5": "5ccb5ffaf32719a262a356777298c68d",
    "crc32": "a0c41ae5",
    "sha1": "833c892c405c947c2af1db8c1b1aac6720a29dac",
    "length": "675.16",
    "height": "0",
    "width": "0"
  }, {
    "name": "junior85_-_03_-_OnwardUpward.png",
    "source": "derivative",
    "format": "PNG",
    "original": "junior85_-_03_-_OnwardUpward.mp3",
    "mtime": "1414491700",
    "size": "10034",
    "md5": "54ebdaf46b8218e89eb73ae9f00f18c6",
    "crc32": "d86608a9",
    "sha1": "d587ed152b7716a5975dc96a6420f496e143a82f"
  }],
  "files_count": 15,
  "item_size": 100464686,
  "metadata": {
    "identifier": "OnwardUpward-13786",
    "uploader": "jake@archive.org",
    "addeddate": "2013-04-02 18:11:23",
    "publicdate": "2013-04-02 18:13:15",
    "collection": "freemusicarchive",
    "mediatype": "audio",
    "boxid": "OL100020300",
    "backup_location": "ia905608_33",
    "album_type": "Album",
    "description": "<p><br /></p>",
    "title": "Onward&Upward",
    "creator": "junior85",
    "source": "https://freemusicarchive.org/music/junior85/OnwardUpward/",
    "artist_url": "http://freemusicarchive.org/music/junior85/",
    "date": "2013-03-15",
    "licenseurl": "http://creativecommons.org/licenses/by-nc-sa/3.0/",
    "artist_website": "http://www.tonyhiggins.org",
    "engineer": "Tony Higgins",
    "producer": "Tony Higgins",
    "year": "2013",
    "subject": "Electronic; Experimental; Ambient; Electronic; Glitch",
    "label": "Record Records",
    "rights": "Permissions beyond the scope of this license may be available at www.tonyhiggins.org or contact artist via email."
  },
  "server": "ia801704.us.archive.org",
  "uniq": 1067966434,
  "workable_servers": ["ia801704.us.archive.org", "ia601704.us.archive.org"]
}