{"id":17176267,"url":"https://github.com/evhub/song-annotation-db","last_synced_at":"2025-03-24T21:42:25.845Z","repository":{"id":79769717,"uuid":"122018040","full_name":"evhub/song-annotation-db","owner":"evhub","description":"Database of aligned song snippets.","archived":false,"fork":false,"pushed_at":"2018-04-27T00:01:26.000Z","size":88,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T01:44:56.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evhub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-19T04:14:21.000Z","updated_at":"2019-12-17T23:52:00.000Z","dependencies_parsed_at":"2023-06-10T19:30:17.635Z","dependency_job_id":null,"html_url":"https://github.com/evhub/song-annotation-db","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evhub%2Fsong-annotation-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evhub%2Fsong-annotation-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evhub%2Fsong-annotation-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evhub%2Fsong-annotation-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evhub","download_url":"https://codeload.github.com/evhub/song-annotation-db/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245359253,"owners_count":20602322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T23:59:44.303Z","updated_at":"2025-03-24T21:42:25.815Z","avatar_url":"https://github.com/evhub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Song Annotation Database\n\nDatabase of aligned song snippets.\n\n## Usage\n\n1. Clone the repository,\n2. copy the `data`, `songs`, and `db` folders from `/home/evhub/ttemp/song-annotation-db/`,\n4. run\n```\nmake\n```\n5. then see below for all the documentation of the various features of the database.\n\n_For example usage of all of the below functions of the database, see [`song_db/__init__.py`](https://github.com/evhub/song-annotation-db/blob/master/song_db/__init__.py)._\n\n## Songs\n\nIf you just need access to labeled reference/query data, you probably want to use the songs database. To import the songs database, just write\n```\nfrom song_db import songs\n```\nwhich will give you access to the following functions for interfacing with the song database.\n\n_If the above gives you a `SyntaxError`, try `from song_db_universal import songs` instead._\n\n**songs.get_snips_for_artist**(`artist, audio_len=songs.DEFAULT_SPLIT_LEN, verbose=False`)\n\nReturns the pair `(refs, queries)` where `refs` is an array of shape `(num_refs, audio_len)` and `queries` is an array of shape `(num_queries, audio_len)`. References and queries are split into `audio_len` chunks such that every row in each array is a clip from some reference/query of length exactly `audio_len` and no clips overlap. Only songs from the given artist are used.\n\n**songs.get_all_snips**(`audio_len=songs.DEFAULT_SPLIT_LEN, verbose=False`)\n\n`get_all_snips` is exactly the same as `get_snips_for_artist` except it includes all the songs in the database, not just those for one artist.\n\n**songs.get_data_for_artist**(`artist, max_query_len=songs.DEFAULT_SPLIT_LEN, verbose=False`)\n\nReturns the 3-tuple `(refs, queries, groundTruth)` where `refs` is a list of all the references for the given artist, `queries` is a list of all split queries (defined below) for the given artist, and `groundTruth` is a list of labels for `queries` (such that `queries` and `groundTruth` are guaranteed to have the same length). The `groundTruth` label for a query is simply the index of the reference in `refs` that the query corresponds to. The `max_query_len` parameter specifies the maximum length of a query you are willing to allow, and splits all queries into smaller query chunks of length less than or equal to the given `max_query_len`.\n\n**songs.get_all_data**(`max_query_len=songs.DEFAULT_SPLIT_LEN, verbose=False`)\n\n`get_all_data` is exactly the same as `get_data_for_artist` except it includes all the songs in the database, not just those for one artist.\n\n_If you need finer-grained access to the songs database than the above functions provide, see `song_db/songs.py`._\n\n## Annotations\n\nIf you want annotated data, you probably want to use the annotations database. To import the annotations database, just write\n```\nfrom song_db import annotations\n```\nwhich will give you access to the following functions for interfacing with the annotation database.\n\n_If the above gives you a `SyntaxError`, try `from song_db_universal import annotations` instead._\n\n**annotations.get_ref_query_pairs**(`artist, beat_width=annotations.DEFAULT_BEAT_WIDTH`)\n\nReturns an iterator of `(ref_beat_array, query_beat_array)` pairs for the given artist. One pair is generated for each annotated beat in each annotated query. The `query_beat_array` is simply a segment of the query around that beat of length `beat_width` and the `ref_beat_array` is just the same length segment of the corresponding beat in the reference.\n\n**annotations.data_by_artist**(`beat_width=annotations.DEFAULT_BEAT_WIDTH`)\n\nReturns an ordered dictionary from artist name to the result of `get_ref_query_pairs` for that artist.\n\n**annotations.data_by_song**(`beat_width=annotations.DEFAULT_BEAT_WIDTH`)\n\nReturns an ordered dictionary mapping `(artist_name, reference_name)` tuples to iterators of `(ref_beat_array, query_beat_array)` pairs for the given artist and song.\n\n_If you need finer-grained access to the annotations database than the above functions provide, see `song_db/annotations.py`._\n\n## Features\n\n### Feature Generation\n\nUsing \u003chttps://github.com/evhub/transfer_learning_music\u003e, you can generate features for this database. To do this, run\n```\ncd song-annotation-db\nmake run-universal\ncd ../transfer_learning_music\nmake run-universal\n```\n\n### Feature Summary\n\nIf you run\n```\nmake run-universal\n```\nwith a generated features file available, you should get (approximately) the following feature summary\n```\nThe database contains 13566 entries (6783 each reference and query)\nwith 160 features per entry. Reference and query feature arrays\nare an average of\n        0.9619966745376587\nstandard deviations apart and\n        1.24441397190094\nmean absolute deviations apart. For comparison, if we randomly\npermute the reference and query features they are an average of\n        1.1164846420288086\nstandard deviations apart and\n        1.4439947605133057\nmean absolute deviations apart. Alternatively, if we randomly\npartition the whole dataset, we get that the two partitions are\nan average of\n        1.090288519859314\nstandard deviations apart and\n        1.4102412462234497\nmean absolute deviations apart.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevhub%2Fsong-annotation-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevhub%2Fsong-annotation-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevhub%2Fsong-annotation-db/lists"}