pyaca
Python scripts accompanying the book "An Introduction to Audio Content Analysis" (www.AudioContentAnalysis.org)
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.8%) to scientific vocabulary
Keywords
Repository
Python scripts accompanying the book "An Introduction to Audio Content Analysis" (www.AudioContentAnalysis.org)
Basic Info
Statistics
- Stars: 171
- Watchers: 8
- Forks: 40
- Open Issues: 2
- Releases: 0
Topics
Metadata Files
README.md
pyACA
Python scripts accompanying the book "An Introduction to Audio Content Analysis". The source code shows example implementations of basic approaches, features, and algorithms for music audio content analysis.
All implementations are also available in: * Matlab: ACA-Code * C++: libACA
functionality
The top-level functions are (alphabetical):
computeBeatHisto: calculates a simple beat histogramcomputeChords: simple chord recognitioncomputeFeature: calculates instantaneous featurescomputeFingerprint: audio fingerprint extractioncomputeKey: calculates a simple key estimatecomputeMelSpectrogram: computes a mel spectrogramcomputeNoveltyFunction: simple onset detectioncomputePitch: calculates a fundamental frequency estimatecomputeSpectrogram: computes a magnitude spectrogram
The names of the additional functions follow the following conventions:
Feature*: instantaneous featuresPitch*: pitch tracking approachNovelty*: novelty function computationTool*: additional helper functions and basic algorithms such as
- Blocking of audio into overlapping blocks
- Pre-processing audio
- Conversion (freq2bark, freq2mel, freq2midi, mel2freq, midi2freq)
- Filterbank (Gammatone)
- Gaussian Mixture Model
- Principal Component Analysis
- Feature Selection
- Dynamic Time Warping
- K-Means Clustering
- K Nearest Neighbor classification
- Non-Negative Matrix Factorization
- Viterbi algorithm
documentation
The latest full documentation of this package can be found at https://alexanderlerch.github.io/pyACA.
design principles
Please note that the provided code examples are only intended to showcase algorithmic principles – they are not entirely suitable for practical usage without parameter optimization and additional algorithmic tuning. Rather, they intend to show how to implement audio analysis solutions and to facilitate algorithmic understanding to enable the reader to design and implement their own analysis approaches.
minimal dependencies
The required dependencies are reduced to a minimum, more specifically to only numpy and scipy, for the following reasons: * accessibility, i.e., clear algorithmic implementation from scratch without obfuscation by using 3rd party implementations, * maintainability through independence of 3rd party code. This design choice brings, however, some limitations; for instance, reading of non-RIFF audio files is not supported and the machine learning models are very simple.
readability
Consistent variable naming and formatting, as well as the choice for simple implementations allow for easier parsing. The readability of the source code will sometimes come at the cost of lower performance.
cross-language comparability
All code is matched exactly with Matlab implementations and the equations in the book. This also means that the python code might violate typical python style conventions in order to be consistent.
related repositories and links
The python source code in this repository is matched with corresponding source code in the Matlab repository. A C++ implementation with identical functionality can be found in the C++ repository.
Other, related repositories are * ACA-Slides: slide decks for teaching and learning audio content analysis * ACA-Plots: Matlab scripts for generating all plots in the book and slides
The main entry point to all book-related information is AudioContentAnalysis.org
getting started
installation
console
pip install pyACA
code examples
example 1: computation and plot of the Spectral Centroid
```python import pyACA import matplotlib.pyplot as plt
file to analyze
cPath = "c:/temp/test.wav"
extract feature
[v, t] = pyACA.computeFeatureCl(cPath, "SpectralCentroid")
plot feature output
plt.plot(t,np.squeeze(v)) ``` example 2: Computation of two features (here: Spectral Centroid and Spectral Flux)
```python import pyACA
read audio file
cPath = "c:/temp/test.wav" [f_s, afAudioData] = pyACA.ToolReadAudio(cPath)
compute feature
[vsc, t] = pyACA.computeFeature("SpectralCentroid", afAudioData, fs) [vsf, t] = pyACA.computeFeature("SpectralFlux", afAudioData, fs) ```
Owner
- Name: Alexander Lerch
- Login: alexanderlerch
- Kind: user
- Location: Atlanta
- Company: Georgia Institute of Technology
- Website: https://www.AudioContentAnalysis.org
- Repositories: 24
- Profile: https://github.com/alexanderlerch
Music Information Retrieval and Audio Content Analysis
Citation (citation.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Lerch"
given-names: "Alexander"
orcid: "0000-0001-6319-578X"
title: "pyACA for Audio Content Analysis"
version: v0.3.1
doi: 10.5281/zenodo.6310329
date-released: 2022-02-28
url: "https://github.com/alexanderlerch/pyACA"
preferred-citation:
type: article
authors:
- family-names: "Lerch"
given-names: "Alexander"
orcid: "0000-0001-6319-578X"
doi: "10.1016/j.simpa.2022.100349"
journal: "Software Impacts"
start: 100349
title: "libACA, pyACA, and ACA-Code: Audio content analysis in 3 languages"
year: 2022
GitHub Events
Total
- Issues event: 1
- Watch event: 16
- Push event: 2
- Fork event: 2
Last Year
- Issues event: 1
- Watch event: 16
- Push event: 2
- Fork event: 2
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 192
- Total Committers: 3
- Avg Commits per committer: 64.0
- Development Distribution Score (DDS): 0.234
Top Committers
| Name | Commits | |
|---|---|---|
| alexanderlerch | a****h@g****u | 147 |
| Kaushal Sali | s****l@g****m | 44 |
| Richard Yang | R****g@b****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 26
- Total pull requests: 10
- Average time to close issues: 3 months
- Average time to close pull requests: about 1 month
- Total issue authors: 4
- Total pull request authors: 4
- Average comments per issue: 0.46
- Average comments per pull request: 0.1
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: about 15 hours
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
- alexanderlerch (24)
- desothier1 (1)
- paranoid2droid (1)
- zseramnay (1)
Pull Request Authors
- kaushalsali (6)
- alexanderlerch (3)
- dependabot[bot] (2)
- RichardYang40148 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 285 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 11
- Total maintainers: 1
pypi.org: pyaca
scripts accompanying the book An Introduction to Audio Content Analysis by Alexander Lerch
- Homepage: https://github.com/alexanderlerch/pyACA
- Documentation: https://pyaca.readthedocs.io/
- License: MIT
-
Latest release: 0.3.1
published almost 4 years ago
Rankings
Maintainers (1)
Dependencies
- matplotlib *
- numpy *
- scipy *
- setuptools-scm *
- matplotlib *
- numpy *
- scipy *
- EndBug/add-and-commit v8 composite
- actions/checkout v2 composite
- actions/download-artifact v3 composite
- actions/upload-artifact v3 composite
- mattnotmitt/doxygen-action edge composite
- actions/checkout master composite
- actions/setup-python v5 composite
- ncipollo/release-action v1 composite
- pypa/gh-action-pypi-publish master composite