Skip to main content

Categorise sounds within an audio file

Project description

epanns

epanns is a tool for categorising sound within an audio file. It is uses the E-PANNs lightweight pre-trained model developed by Arshdeep Singh at the University of Surrey. Sounds are categorised using the Google AudioSet ontology.

Command-line usage

Use pipx to install it as a CLI tool

pipx install epanns

Running the following

epanns /path/to/audio.wav

will return the predicted categories and their probability as JSON

[
  [
    "Speech",
    0.7508
  ],
  [
    "Inside, small room",
    0.0186
  ],
  [
    "Computer keyboard",
    0.0145
  ]
]

To see the available options, run epanns --help

If you do not provide a checkpoint path, the model checkpoint will be downloaded on the first run and cached for future runs.

Library usage

Use pip to install

pip install epanns

Calling it as a library

from epanns.predict import predict
top_preds = predict('/path/to/audio.wav')
print(top_preds)

will return a list of tuples for the top predictions

[
  ('Speech', 0.7508),
  ('Inside, small room', 0.0186),
  ('Computer keyboard', 0.0145)
]

Acknowledgements

This software is based on the following research. Please cite these papers:

  • Arshdeep Singh, Haohe Liu and Mark D PLumbley. "E-PANNS: Sound Recognition using Efficient Pre-Trained Audio Neural Networks", accepted in Internoise 2023.

  • Singh, Arshdeep, and Mark D. Plumbley. "Efficient CNNs via Passive Filter Pruning." arXiv preprint arXiv:2304.02319 (2023).

  • Qiuqiang Kong, Yin Cao, Turab Iqbal, Yuxuan Wang, Wenwu Wang, Mark D. Plumbley. "PANNs: Large-Scale Pretrained Audio Neural Networks for Audio Pattern Recognition." arXiv preprint arXiv:1912.10211 (2019).

The research was supported by Engineering and Physical Sciences Research Council (EPSRC) Grant EP/T019751/1 “AI for Sound (AI4S)”. Project link: https://ai4s.surrey.ac.uk/

Related links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epanns-0.1.4.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epanns-0.1.4-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file epanns-0.1.4.tar.gz.

File metadata

  • Download URL: epanns-0.1.4.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.13 Darwin/23.2.0

File hashes

Hashes for epanns-0.1.4.tar.gz
Algorithm Hash digest
SHA256 939f512b591688519090456d2be3139c6b17a8db4bdaf70554d2830a235eae93
MD5 28ef9e18934af5dc3b4be52526b1b25c
BLAKE2b-256 5727d789c5cf7ed7ef0cb7a66aa86b08ab4198f4692e03e50f416259b62600d3

See more details on using hashes here.

File details

Details for the file epanns-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: epanns-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.13 Darwin/23.2.0

File hashes

Hashes for epanns-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 332a637fc080cc5308c0e2007f3642209109ca7f88f4b4534d43a74df4378780
MD5 913b78da078f9a1f5df7e81ac9089e50
BLAKE2b-256 39baf9ccd8c11554f7df4a6a6bbc84e63c0fccabf6183f041cd263fb9234f069

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page