OpenSoundscape
OpenSoundscape (OPSO) is free and open source Python utility library analyzing bioacoustic data.
OpenSoundscape includes utilities which can be strung together to create data analysis pipelines, including functions to:
load and manipulate audio files
create and manipulate spectrograms
train convolutional neural networks (CNNs) on spectrograms with PyTorch
run pre-trained CNNs to detect vocalizations
detect periodic vocalizations with RIBBIT
load and manipulate Raven annotations
estimate the location of sound sources from synchronized recordings
Table of Contents
The documentation is organized into the following sections:
Introduction:
Quick Start Guide: please visit the main README
Links to resources
Orientation for PyTorch users
Installation:
Installation instructions for Windows, Mac, and Linux operating systems. For cluster or cloud environments, follow the Linux operating system instructions
Instructions for using OpenSoundscape with different utilities, e.g. Jupyter, Google Colab, and Poetry (for contributors)
Tutorials:
Step-by-step guides for how to use OpenSoundscape’s common functions.
These tutorials include code, examples, and downloadable data.
All tutorials are written as Jupyter Notebooks that can be downloaded and run on your own computer or run on Google Colab.
Classifiers 101:
An introduction to a philosophy for training and using classifiers, influenced by our lab’s work using bioacoustic classifiers for large-scale bioacoustic monitoring of animal sounds
Codebase Documentation:
Documentation for the entire API (“application programming interface”) of OpenSoundscape: its functions (and their arguments) and classes (and their methods).
Contact & Citation
OpenSoundcape is developed and maintained by the Kitzes Lab at the University of Pittsburgh. It is currently in active development.
If you find a bug, please submit an issue on the GitHub repository. If you have another question about OpenSoundscape, please use the OpenSoundscape Discussions board or email Sam Lapp (sam.lapp at pitt.edu)
Suggested citation:
Lapp, Sam; Rhinehart, Tessa; Freeland-Haynes, Louis; Khilnani, Jatin; Syunkova, Alexandra; Kitzes, Justin. “OpenSoundscape: An Open-Source Bioacoustics Analysis Package for Python.” Methods in Ecology and Evolution 2023. https://doi.org/10.1111/2041-210X.14196.
API Documentation
- Subpackages
- opensoundscape.localization package
- Submodules
- opensoundscape.localization.audiomoth_sync module
- opensoundscape.localization.localization_algorithms module
- opensoundscape.localization.position_estimate module
- opensoundscape.localization.spatial_event module
- opensoundscape.localization.synchronized_recorder_array module
- opensoundscape.localization.utils module
- Module contents
- opensoundscape.ml package
- Submodules
- opensoundscape.ml.cam module
- opensoundscape.ml.cnn module
- opensoundscape.ml.cnn_architectures module
alexnet()change_conv2d_channels()change_fc_output_size()densenet121()efficientnet_b0()efficientnet_b4()freeze_params()generic_make_arch()inception_v3()list_architectures()register_arch()resnet101()resnet152()resnet18()resnet34()resnet50()set_layer_from_name()squeezenet1_0()unfreeze_params()vgg11_bn()
- opensoundscape.ml.dataloaders module
- opensoundscape.ml.datasets module
- opensoundscape.ml.lightning module
- opensoundscape.ml.loss module
- opensoundscape.ml.safe_dataset module
- opensoundscape.ml.sampling module
- opensoundscape.ml.shallow_classifier module
- opensoundscape.ml.utils module
- Module contents
- opensoundscape.preprocess package
- Submodules
- opensoundscape.preprocess.action_functions module
- opensoundscape.preprocess.actions module
- opensoundscape.preprocess.img_augment module
- opensoundscape.preprocess.io module
- opensoundscape.preprocess.overlay module
- opensoundscape.preprocess.preprocessors module
- opensoundscape.preprocess.tensor_augment module
- opensoundscape.preprocess.utils module
- Module contents
- opensoundscape.localization package
- Submodules
- opensoundscape.annotations module
BoxedAnnotationsBoxedAnnotations.annotation_filesBoxedAnnotations.audio_filesBoxedAnnotations.bandpass()BoxedAnnotations.clip_labels()BoxedAnnotations.concat()BoxedAnnotations.convert_labels()BoxedAnnotations.dfBoxedAnnotations.from_crowsetta()BoxedAnnotations.from_crowsetta_bbox()BoxedAnnotations.from_crowsetta_seq()BoxedAnnotations.from_csv()BoxedAnnotations.from_raven_files()BoxedAnnotations.global_multi_hot_labels()BoxedAnnotations.labels_on_index()BoxedAnnotations.subset()BoxedAnnotations.to_crowsetta()BoxedAnnotations.to_csv()BoxedAnnotations.to_raven_files()BoxedAnnotations.train_test_split()BoxedAnnotations.trim()BoxedAnnotations.unique_labels()
CategoricalLabelsCategoricalLabels.class_labelsCategoricalLabels.from_categorical_labels_df()CategoricalLabels.from_multihot_df()CategoricalLabels.labelsCategoricalLabels.labels_at_index()CategoricalLabels.multihot_array()CategoricalLabels.multihot_denseCategoricalLabels.multihot_df()CategoricalLabels.multihot_df_denseCategoricalLabels.multihot_df_sparseCategoricalLabels.multihot_labels_at_index()CategoricalLabels.multihot_sparse
categorical_to_integer_labels()categorical_to_multi_hot()diff()find_overlapping_idxs_in_clip_df()integer_to_categorical_labels()integer_to_multi_hot()multi_hot_to_categorical()multi_hot_to_integer_labels()unique()
- opensoundscape.audio module
AudioAudio.apply_gain()Audio.bandpass()Audio.dBFSAudio.durationAudio.extend_by()Audio.extend_to()Audio.from_bytesio()Audio.from_file()Audio.from_url()Audio.highpass()Audio.loop()Audio.lowpass()Audio.metadataAudio.noise()Audio.normalize()Audio.reduce_noise()Audio.resample()Audio.resample_typeAudio.rmsAudio.sample_rateAudio.samplesAudio.save()Audio.show_widget()Audio.silence()Audio.spectrum()Audio.split()Audio.split_and_save()Audio.trim()Audio.trim_samples()Audio.trim_with_timestamps()
AudioOutOfBoundsErrorMultiChannelAudioMultiChannelAudio.apply_channel_gain()MultiChannelAudio.durationMultiChannelAudio.extend_to()MultiChannelAudio.from_audio_list()MultiChannelAudio.from_file()MultiChannelAudio.metadataMultiChannelAudio.n_channelsMultiChannelAudio.noise()MultiChannelAudio.resample_typeMultiChannelAudio.sample_rateMultiChannelAudio.samplesMultiChannelAudio.save()MultiChannelAudio.silence()MultiChannelAudio.spectrum()MultiChannelAudio.split_and_save()MultiChannelAudio.to_channels()MultiChannelAudio.to_mono()MultiChannelAudio.trim_samples()
OpsoLoadAudioInputErrorbandpass_filter()clipping_detector()concat()estimate_delay()generate_opso_metadata_str()highpass_filter()load_channels_as_audio()lowpass_filter()mix()parse_metadata()parse_opso_metadata()transpose_samples_decorator()write_metadata()
- opensoundscape.data_selection module
- opensoundscape.logging module
- opensoundscape.metrics module
- opensoundscape.ribbit module
- opensoundscape.sample module
- opensoundscape.signal_processing module
- opensoundscape.spectrogram module
MelSpectrogramSpectrogramSpectrogram.frequenciesSpectrogram.timesSpectrogram.spectrogramSpectrogram.window_samplesSpectrogram.overlap_samplesSpectrogram.window_typeSpectrogram.audio_sample_rateSpectrogram.scalingSpectrogram.amplitude()Spectrogram.audio_sample_rateSpectrogram.bandpass()Spectrogram.durationSpectrogram.frequenciesSpectrogram.from_audio()Spectrogram.limit_range()Spectrogram.linear_scale()Spectrogram.min_max_scale()Spectrogram.net_amplitude()Spectrogram.overlap_samplesSpectrogram.plot()Spectrogram.scalingSpectrogram.spectrogramSpectrogram.timesSpectrogram.to_image()Spectrogram.trim()Spectrogram.window_lengthSpectrogram.window_samplesSpectrogram.window_start_timesSpectrogram.window_stepSpectrogram.window_type
- opensoundscape.utils module
- Module contents