Skip to content

Commit

Permalink
Audio quality analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
AnanthVivekanand committed Oct 17, 2020
1 parent 75bfdc5 commit ab2d3ee
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,25 @@
" return (D)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"metadata = pd.read_csv('./UrbanSound8k/metadata/UrbanSound8K.csv')\n",
"\n",
"audiodata = []\n",
"for index, row in metadata.iterrows():\n",
" \n",
" file_name = os.path.join(os.path.abspath('UrbanSound8k/audio/'),'fold'+str(row[\"fold\"])+'/',str(row[\"slice_file_name\"]))\n",
" data = wavfilehelper.read_file_properties(file_name)\n",
" audiodata.append(data)\n",
"\n",
"# Convert into a Panda dataframe\n",
"audiodf = pd.DataFrame(audiodata, columns=['num_channels','sample_rate','bit_depth'])"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -139,6 +158,13 @@
"\n",
"x_train, x_test, y_train, y_test = train_test_split(X, yy, test_size=0.2, random_state = 42)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit ab2d3ee

Please sign in to comment.