{"id":13585118,"url":"https://github.com/imfing/audio-classification","last_synced_at":"2025-03-16T20:31:05.053Z","repository":{"id":126605511,"uuid":"113475936","full_name":"imfing/audio-classification","owner":"imfing","description":":musical_score: Environmental sound classification using Deep Learning with extracted features","archived":false,"fork":false,"pushed_at":"2020-01-22T05:18:54.000Z","size":16493,"stargazers_count":165,"open_issues_count":0,"forks_count":53,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-10T17:58:05.768Z","etag":null,"topics":["deep-learning"],"latest_commit_sha":null,"homepage":"","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/imfing.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}},"created_at":"2017-12-07T16:46:57.000Z","updated_at":"2025-02-10T05:32:02.000Z","dependencies_parsed_at":"2023-06-17T10:15:46.081Z","dependency_job_id":null,"html_url":"https://github.com/imfing/audio-classification","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/imfing%2Faudio-classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Faudio-classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Faudio-classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Faudio-classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imfing","download_url":"https://codeload.github.com/imfing/audio-classification/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830912,"owners_count":20354848,"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":["deep-learning"],"created_at":"2024-08-01T15:04:45.078Z","updated_at":"2025-03-16T20:31:04.729Z","avatar_url":"https://github.com/imfing.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Environmental Sound Classification using Deep Learning\n\n\u003e A project from Digital Signal Processing course\n## Dependencies\n\n- Python 3.6\n- numpy\n- librosa\n- pysoundfile\n- sounddevice\n- matplotlib\n- scikit-learn\n- tensorflow\n- keras\n\n## Dataset\n\nDataset could be downloaded at [Dataverse](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/YDEPUT) or [Github](https://github.com/karoldvl/ESC-50).\n\nI'd recommend use ESC-10 for the sake of convenience.\n\nExample:\n\n```\n├── 001 - Cat\n│  ├── cat_1.ogg\n│  ├── cat_2.ogg\n│  ├── cat_3.ogg\n│  ...\n...\n└── 002 - Dog\n   ├── dog_barking_0.ogg\n   ├── dog_barking_1.ogg\n   ├── dog_barking_2.ogg\n   ...\n```\n\n## Feature Extraction\n\nPut audio files (`.wav` untested) under `data` directory and run the following command:\n\n`python feat_extract.py`\n\nFeatures and labels will be generated and saved in the directory.\n\n## Classify with SVM\n\nMake sure you have `scikit-learn` installed and `feat.npy` and `label.npy` under the same directory. Run `svm.py` and you could see the result.\n\n## Classify with Multilayer Perceptron\n\nInstall `tensorflow` and `keras` at first. Run `nn.py` to train and test the network.\n\n## Classify with Convolutional Neural Network\n\n- Run `cnn.py -t` to train and test a CNN. Optionally set how many epochs to train on.\n- Predict files by either:\n  - Putting target files under `predict/` directory and running `cnn.py -p`\n  - Recording on the fly with `cnn.py -P`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimfing%2Faudio-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimfing%2Faudio-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimfing%2Faudio-classification/lists"}