{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from ok import LP_MusicCaps_MC\n", "import matplotlib.pyplot as plt\n", "import os\n", "import pandas as pd\n", "import json\n", "import numpy as np\n", "import seaborn as sns\n" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# 1. Checking the audio data" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## 1.1 Sampling rates" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "LP_MusicCaps_MC: load metadata file /home/amen/tsi/audiosig/audible_share/music/data/LP_MusicCaps_MC/metadata.csv\n" ] } ], "source": [ "dataset = LP_MusicCaps_MC()\n", "pdf_metadata = dataset._pdf_metadata\n", "\n", "train_df = pdf_metadata.loc[pdf_metadata['set'] == 'train']\n", "test_df = pdf_metadata.loc[pdf_metadata['set'] == 'eval']" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | file_path | \n", "track_id | \n", "fname | \n", "tags | \n", "caption_ground_truth | \n", "caption_writing | \n", "caption_summary | \n", "caption_paraphrase | \n", "caption_attribute_prediction | \n", "pseudo_attribute | \n", "... | \n", "author_id | \n", "start_s | \n", "end_s | \n", "audioset_positive_labels | \n", "is_balanced_subset | \n", "set | \n", "n_channels | \n", "sampling_rate | \n", "duration | \n", "cutoff_freq | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "LzSWdj4izHM | \n", "[LzSWdj4izHM]-[20-30] | \n", "['folkmusic', 'accordion', 'acoustic drums', '... | \n", "$$$An acoustic drum is playing a faster groove... | \n", "$$$This folkmusic jam features a dynamic blend... | \n", "$$$An upbeat folk song with accordion, acousti... | \n", "$$$This is a lively folk tune that showcases t... | \n", "$$$This folkmusic song is accompanied by an ac... | \n", "['acoustic guitar', 'banjo', 'violin'] | \n", "... | \n", "6 | \n", "20 | \n", "30 | \n", "/m/04rlf,/t/dd00032 | \n", "True | \n", "eval | \n", "2 | \n", "44100 | \n", "10.0 | \n", "9302 | \n", "
| 1 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "_Ra1Y6K7nSs | \n", "[_Ra1Y6K7nSs]-[0-10] | \n", "['chalk writing on blackboard', 'bass', 'male ... | \n", "$$$This reggae song features male voices singi... | \n", "$$$Experience the upbeat and joyous vibes of a... | \n", "$$$Chalkboard Celebration is a reggae song wit... | \n", "$$$Picture yourself dancing to the upbeat regg... | \n", "$$$This reggae celebration song has a happy mo... | \n", "['guitar', 'brass', 'harmonica'] | \n", "... | \n", "0 | \n", "0 | \n", "10 | \n", "/m/04rlf,/m/06cqb | \n", "False | \n", "train | \n", "2 | \n", "44100 | \n", "10.0 | \n", "11498 | \n", "
| 2 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "i_d4JFg-zT0 | \n", "[i_d4JFg-zT0]-[30-40] | \n", "['finnish pop', 'male vocal', 'melodic singing... | \n", "$$$This is a Finnish pop piece. There is a mal... | \n", "$$$This Finnish pop hit features melodic singi... | \n", "$$$This Finnish pop song features melodic sing... | \n", "$$$Experience the effortless charm of Finnish ... | \n", "$$$This Finnish pop song features melodic sing... | \n", "['synthesizer', 'backing vocals', 'funky bassl... | \n", "... | \n", "9 | \n", "30 | \n", "40 | \n", "/m/0164x2,/m/03r5q_,/m/04rlf,/m/05w3f | \n", "True | \n", "eval | \n", "2 | \n", "44100 | \n", "10.0 | \n", "12683 | \n", "
| 3 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "AAP5pAB-4jM | \n", "[AAP5pAB-4jM]-[0-10] | \n", "['atmospherical/meditative', 'glass breaking s... | \n", "$$$This song contains several synth pad sounds... | \n", "$$$An atmospherical and meditative slow tempo ... | \n", "$$$This song creates a meditative atmosphere w... | \n", "$$$Immerse yourself in a contemplative atmosph... | \n", "$$$This moody and introspective track features... | \n", "['ethereal vocals', 'field recordings', 'ambie... | \n", "... | \n", "6 | \n", "0 | \n", "10 | \n", "/m/039jq,/m/04rlf,/m/07pc8lb | \n", "False | \n", "eval | \n", "2 | \n", "48000 | \n", "10.0 | \n", "12468 | \n", "
| 4 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "gsBXngKgy-Q | \n", "[gsBXngKgy-Q]-[30-40] | \n", "['salsa', 'latin', 'group male vocals', 'timba... | \n", "$$$Salsa music featuring heavy percussion incl... | \n", "$$$The dynamic and high-energy salsa track fea... | \n", "$$$A lively salsa song with complex chords, fu... | \n", "$$$This upbeat salsa anthem boasts Latin flair... | \n", "$$$This upbeat salsa song features a full lati... | \n", "['conga', 'clave', 'piano solos'] | \n", "... | \n", "8 | \n", "30 | \n", "40 | \n", "/m/015lz1,/m/015y_n,/m/04rlf,/m/06rqw,/m/074ft... | \n", "True | \n", "eval | \n", "2 | \n", "44100 | \n", "10.0 | \n", "6352 | \n", "
| ... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
| 5513 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "QUB_vpjogmo | \n", "[QUB_vpjogmo]-[170-180] | \n", "['low quality', 'noisy', 'crackling', 'vinyl',... | \n", "$$$The low quality recording features a dark m... | \n", "$$$This low quality, noisy track boasts a crac... | \n", "$$$A dark and suspenseful song with low qualit... | \n", "$$$This haunting track veiled in low quality v... | \n", "$$$This hauntingly cinematic track has a low q... | \n", "['echoey reverb', 'gritty distortion', 'analog... | \n", "... | \n", "4 | \n", "170 | \n", "180 | \n", "/m/04rlf,/m/0b9m1 | \n", "False | \n", "eval | \n", "2 | \n", "48000 | \n", "10.0 | \n", "3515 | \n", "
| 5514 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "BVt8RgNrwbQ | \n", "[BVt8RgNrwbQ]-[30-40] | \n", "['low quality', 'ambient', 'wide echoing femal... | \n", "$$$The low quality recording features an ambie... | \n", "$$$This low quality ambient track features a w... | \n", "$$$Ambient low-quality song with wide echoing ... | \n", "$$$This song presents a dreamy soundscape with... | \n", "$$$This track features calming, ambient sounds... | \n", "['ethereal synth', 'distant strings', 'vibrant... | \n", "... | \n", "4 | \n", "30 | \n", "40 | \n", "/m/0l14t7 | \n", "False | \n", "train | \n", "2 | \n", "48000 | \n", "10.0 | \n", "6960 | \n", "
| 5515 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "0L2ndtt60Q8 | \n", "[0L2ndtt60Q8]-[30-40] | \n", "['sound effects', 'chipmunk vocal', 'hamster',... | \n", "$$$This is a parody of an electronic music son... | \n", "$$$This hilarious parody track features chipmu... | \n", "$$$This song is a funny parody with high-pitch... | \n", "$$$Prepare to laugh as this hilarious parody t... | \n", "$$$This electronic music parody combines chipm... | \n", "['silly lyrics', 'catchy melody'] | \n", "... | \n", "9 | \n", "30 | \n", "40 | \n", "/m/04rlf,/t/dd00006 | \n", "False | \n", "eval | \n", "2 | \n", "44100 | \n", "10.0 | \n", "11154 | \n", "
| 5516 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "bBy0NCoCEHc | \n", "[bBy0NCoCEHc]-[540-550] | \n", "['low quality', 'noisy', 'live performance', '... | \n", "$$$The low quality recording features a live p... | \n", "$$$This low-quality, noisy live performance ca... | \n", "$$$A traditional live performance with low qua... | \n", "$$$Experience the raw, unpolished energy of a ... | \n", "$$$This traditional-style live performance fea... | \n", "['audience participation', 'acoustic guitar', ... | \n", "... | \n", "4 | \n", "540 | \n", "550 | \n", "/m/02w4v,/m/04rlf,/m/05r5wn,/m/09x0r | \n", "False | \n", "train | \n", "2 | \n", "48000 | \n", "10.0 | \n", "11273 | \n", "
| 5517 | \n", "/home/amen/tsi/audiosig/audible_share/music/da... | \n", "VCIN1OJkNbg | \n", "[VCIN1OJkNbg]-[30-40] | \n", "['amateur recording', 'organ playing', 'medium... | \n", "$$$Someone is playing a melody along with chor... | \n", "$$$This amateur recording showcases the vibran... | \n", "$$$An amateur recording featuring medium/uptem... | \n", "$$$This catchy tune showcases the lively organ... | \n", "$$$This medium/uptempo song features a soulful... | \n", "['soulful vocals', 'groovy bassline', 'electri... | \n", "... | \n", "6 | \n", "30 | \n", "40 | \n", "/m/013y1f,/m/03gvt,/m/03q5t,/m/05148p4 | \n", "False | \n", "train | \n", "2 | \n", "44100 | \n", "10.0 | \n", "1894 | \n", "
5518 rows × 21 columns
\n", "