Repository navigation
Description
We should add some version of the algorithm that AVA uses to segment mouse USVs from audio
- https://github.com/pearsonlab/autoencoded-vocal-analysis/blob/fac3b53280bdac95dd9fb5ab8e276fdb90dab1e3/ava/segmenting/amplitude_segmentation.py#L19
- A set of parameters for mice are in this example script: https://github.com/pearsonlab/autoencoded-vocal-analysis/blob/master/examples/mouse_sylls_mwe.py
- That they use with this dataset: https://research.repository.duke.edu/concern/datasets/9k41zf38g?locale=en
as the algorithm is being used in papers, e.g. from @nickjourjine
https://github.com/nickjourjine/peromyscus-pup-vocal-evolution/blob/1104538121316fa58b69f337f3e28e453f738c58/src/segmentation.py#L21
and from @ralphpeterson, see https://www.biorxiv.org/content/10.1101/2023.03https://research.repository.duke.edu/concern/datasets/9k41zf38g?locale=en.11.532197v1.full.pdf
but with the addition of the use of spectral flatness to filter vocalizations from non-vocalizations, see here (and relevant citations in paper we should include in a References section of docstring):
https://github.com/ralphpeterson/gerbil-vocal-dialects/blob/main/vocalization_segmenting.py
See also the paper for their parameters
As part of #40 and originally discussed in #5 -- note this is already in progress in https://github.com/vocalpy/vocalpy/tree/add-segment-module but I'm breaking out each algorithm as separate issues, like here. (I will probably rename the branch something to add-ava-segmenter)
We should
- implement
- Seeing again that it has been used by at least 3 papers I think I should undo some of the changes I made and provide just a slightly cleaned up version that preserves the behavior of the original, and name it something like
ava_segmenter - default parameters should be those from that example script
- would be nice to also provide Ralph's params as a dataclass that could be pass in by converting to a dict and unpacking with the
**operator
- Seeing again that it has been used by at least 3 papers I think I should undo some of the changes I made and provide just a slightly cleaned up version that preserves the behavior of the original, and name it something like
- also include a tutorial that walks through the algorithm step-by-step
Activity
ENH: Add segment module with ava algorithm, fixes #40 #46 (#53)
NickleDave commentedon Sep 21, 2023
This was added in #53 , still need to add a demo in the docs (as in #52)