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.5.tar.gz (16.7 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.5-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: epanns-0.1.5.tar.gz
  • Upload date:
  • Size: 16.7 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.5.tar.gz
Algorithm Hash digest
SHA256 c40ede33a17a9120f599ee0efb3c165172581694d6e7b65c5eb8a04cfb219748
MD5 d421fc29162753914a82a139ae3944cc
BLAKE2b-256 062cc3dd8ccfe17d6559932c3bab6b15973335a793d67a97d7c8242a1557b948

See more details on using hashes here.

File details

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

File metadata

  • Download URL: epanns-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 20.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3cbbe195ae802e8ad3c7b14bc214bace5840d0cf74488d895fc823290a9dff98
MD5 314b21fa4414f50d889456f7c763707c
BLAKE2b-256 c3ada3f8ef05d06996d875c99f682ae4bf737c94fe91cff66a1dc23cb8e73007

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