Skip to main content

Python implementation of soundscapecode

Project description

SoundScapeCode

Python implementation of the soundscape code [1], ported from a Matlab example [2].

Installation

pip install soundscapecode

Usage

Values can be calculated individually:

import soundscapecode as ssc

fs = 48000
mock_sound = np.random.rand(fs*60, 1)
periodicity = ssc.periodicity(mock_sound, fs)

Or to calculate all values for one recording:

from soundscapecode import SoundscapeCode

fs = 48000
n_mins = 3
mock_sound = np.random.rand(fs*n_mins*60, 1)
soundscape = SoundscapeCode(mock_sound, fs)
for dt in soundscape["dt"]:
    print(dt)

Testing

Testing has been conducted against the values produced in the Matlab version. To run the tests, export the broad, fish, and invertebrate variables to csv and add them to the data folder, as well as the output file.

Limitations

Spectral dissimilarity and, therefore, dissimilarity are not currently implemented.

Contact

Please contact me with any questions

References

[1] Dylan Wilford, Jennifer Miksis-Olds, Bruce Martin, Kim Lowell; Introduction and application of a proposed method for quantitative soundscape analysis: The soundscape code. J. Acoust. Soc. Am. 1 April 2021; 149 (4_Supplement): A72. https://doi.org/10.1121/10.0004555
[2] https://www.mathworks.com/matlabcentral/fileexchange/172434-sscmetrics-a-matlab-tool-to-compute-the-soundscape-code

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

soundscapecode-0.0.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

soundscapecode-0.0.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file soundscapecode-0.0.1.tar.gz.

File metadata

  • Download URL: soundscapecode-0.0.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for soundscapecode-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4b0343b0ec2ecd438903d2f15ef7301259b68d6984e32525c86dc3d5ccc2f9b9
MD5 c086e6576be222239e7a71eb749d9b99
BLAKE2b-256 9c1fc4405085b79228b37759a77ee4568651541ed4c2df3f1c4ea297592b14c8

See more details on using hashes here.

File details

Details for the file soundscapecode-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: soundscapecode-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for soundscapecode-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4af79ba08d2c7dc11c61ebb81a00df3fd379360b2a6be548d606df95be8fa2bd
MD5 91941c2efd0813758c7820a1659fab88
BLAKE2b-256 1b552d48dc2e6fd386a2e6451368bc465d1ebfd8aea08224dab8d07bb313ef6f

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