Skip to main content

Use Vamp plugins for audio feature analysis.

Project description

This module allows Python code to load and use native-code Vamp plugins (http://vamp-plugins.org) for audio feature analysis.

The module consists of a native-code extension (“vampyhost”) that provides a low-level wrapper for the Vamp plugin SDK, along with a Python wrapper (“vamp”) that provides a higher-level abstraction.

No code for loading audio files is included; you’ll need to use some other module for that. This code expects to receive decoded audio data of one or more channels, either as a series of frames or as a single whole buffer.

Written by Chris Cannam and George Fazekas at the Centre for Digital Music, Queen Mary University of London. Copyright 2008-2015 Queen Mary, University of London. Refer to COPYING.rst for licence details.

See home page at https://code.soundsoftware.ac.uk/projects/vampy-host for more details.

A simple example

Using librosa (http://bmcfee.github.io/librosa/) to read an audio file, and the NNLS Chroma Vamp plugin (https://code.soundsoftware.ac.uk/projects/nnls-chroma/) for analysis:

>>> import vamp
>>> import librosa
>>> data, rate = librosa.load("example.wav")
>>> chroma = vamp.collect(data, rate, "nnls-chroma:nnls-chroma")
>>> chroma
{'matrix': ( 0.092879819, array([[  61.0532608 ,   60.27478409,   59.3938446 , ...,  182.13394165,
          42.40084457,  116.55457306],
       [  68.8901825 ,   63.98115921,   60.77633667, ...,  245.88218689,
          68.51251984,  164.70120239],
       [  58.59794617,   50.3429184 ,   45.44804764, ...,  258.02362061,
          83.95749664,  179.91200256],
       ...,
       [   0.        ,    0.        ,    0.        , ...,    0.        ,
           0.        ,    0.        ],
       [   0.        ,    0.        ,    0.        , ...,    0.        ,
           0.        ,    0.        ],
       [   0.        ,    0.        ,    0.        , ...,    0.        ,
           0.        ,    0.        ]], dtype=float32))}
>>> stepsize, chromadata = chroma["matrix"]
>>> import matplotlib.pyplot as plt
>>> plt.imshow(chromadata)
<matplotlib.image.AxesImage object at 0x7fe9e0043fd0>
>>> plt.show()

And a pitch-chroma plot appears.

High-level interface (vamp)

This module contains three sorts of function:

1. Basic info and lookup functions

  • vamp.list_plugins

  • vamp.get_outputs_of

  • vamp.get_category_of

These retrieve the installed plugin keys and get basic information about each plugin. (For more detailed information, load a plugin and inspect it using the low-level interface described below.)

2. Process functions

  • vamp.process_audio

  • vamp.process_frames

  • vamp.process_audio_multiple_outputs

  • vamp.process_frames_multiple_outputs

These accept audio input, and produce output in the form of a list of feature sets structured similarly to those in the C++ Vamp plugin SDK. The plugin to be used is specified by its key (the identifier as returned by vamp.list_plugins). A dictionary of plugin parameter settings may optionally be supplied.

The _audio versions take a single (presumably long) array of audio samples as input, and chop it into frames according to the plugin’s preferred step and block sizes. The _frames versions instead accept an enumerable sequence of audio frame arrays.

3. The process-and-collect function

  • vamp.collect

This accepts a single array of audio samples as input, and returns an output structure that reflects the underlying structure of the feature output (depending on whether it is a curve, grid, etc). The plugin to be used is specified by its key. A dictionary of plugin parameter settings may optionally be supplied.

The collect function processes the whole input before returning anything; if you need to supply a streamed input, or retrieve results as they are calculated, then you must use one of the process functions (above) or else the low-level interface (below).

Low-level interface (vampyhost)

This extension contains facilities that operate on Vamp plugins in a way analogous to the existing C++ Vamp Host SDK: list_plugins, get_plugin_path, get_category_of, get_library_for, get_outputs_of, load_plugin, and a utility function frame_to_realtime.

Calling load_plugin gets you a vampyhost.Plugin object, which then exposes all of the methods found in the Vamp SDK Plugin class.

(Note that methods wrapped directly from the Vamp SDK are named using camelCase, so as to match the names found in the C++ SDK. Elsewhere this module follows Python PEP8 naming.)

See the individual module and function documentation for further details.

Python Vamp Host Copyright (c) 2008-2015 Queen Mary, University of London

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the names of the Centre for Digital Music and Queen Mary, University of London shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

vamphost-1.3.2-cp313-cp313-win_amd64.whl (109.0 kB view details)

Uploaded CPython 3.13Windows x86-64

vamphost-1.3.2-cp313-cp313-win32.whl (93.4 kB view details)

Uploaded CPython 3.13Windows x86

vamphost-1.3.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

vamphost-1.3.2-cp313-cp313-macosx_11_0_arm64.whl (137.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

vamphost-1.3.2-cp313-cp313-macosx_10_13_x86_64.whl (145.3 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

vamphost-1.3.2-cp312-cp312-win_amd64.whl (109.0 kB view details)

Uploaded CPython 3.12Windows x86-64

vamphost-1.3.2-cp312-cp312-win32.whl (93.3 kB view details)

Uploaded CPython 3.12Windows x86

vamphost-1.3.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

vamphost-1.3.2-cp312-cp312-macosx_11_0_arm64.whl (137.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

vamphost-1.3.2-cp312-cp312-macosx_10_13_x86_64.whl (145.3 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

vamphost-1.3.2-cp311-cp311-win_amd64.whl (108.9 kB view details)

Uploaded CPython 3.11Windows x86-64

vamphost-1.3.2-cp311-cp311-win32.whl (93.3 kB view details)

Uploaded CPython 3.11Windows x86

vamphost-1.3.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

vamphost-1.3.2-cp311-cp311-macosx_11_0_arm64.whl (137.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

vamphost-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl (145.2 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

vamphost-1.3.2-cp310-cp310-win_amd64.whl (108.9 kB view details)

Uploaded CPython 3.10Windows x86-64

vamphost-1.3.2-cp310-cp310-win32.whl (93.2 kB view details)

Uploaded CPython 3.10Windows x86

vamphost-1.3.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

vamphost-1.3.2-cp310-cp310-macosx_11_0_arm64.whl (137.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

vamphost-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl (145.2 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file vamphost-1.3.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: vamphost-1.3.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 109.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for vamphost-1.3.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dd38d7baba7e3ef0a5666595d32eadf8dbd56228ddec7159e4a7ae9b619896dd
MD5 e71fbf19dfbbb2221ade9fe1cb6b86f1
BLAKE2b-256 d01df5f9c9d401d75af945d0351a471956d9a08ef199ec9d1ef6a4891dac011a

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp313-cp313-win32.whl.

File metadata

  • Download URL: vamphost-1.3.2-cp313-cp313-win32.whl
  • Upload date:
  • Size: 93.4 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for vamphost-1.3.2-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 114393fd1c104ff480e41fbd21f85ec0e29207367aeaec5aa5ba1388773eed65
MD5 c6ab3bf4ec7f7f8c3e338f454545d26e
BLAKE2b-256 6cb391347e79d719adef73194436a1b6042a1de014a6dd8c5437ff1131a9968f

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aef75d89b41525937b0f5b0a813f97808ec20f10734a47bd523b52cce60fb431
MD5 14520d828bc42930a1809b9b144d6cb2
BLAKE2b-256 0a2ea2497c71974fc745dd53db5dc6a9321de48ed5ca8b768809953a5ebc4d32

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c549b7060306ba74e60d428dee33d7629ec247cdaae121ff7204f629e9ca3adb
MD5 31be168231d9d8c41aafd7972a3c0864
BLAKE2b-256 ab9a3de0c91aa0367780ccfb7a5cac730771bb7fb8563e2b9dd2bdf6142dc4bd

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 384214647d3bfe253eb20d6fb3c7243e43f1171365ca065bb83b7eab1560e4b8
MD5 dcd38ee46ebc31200b62341d6da83e96
BLAKE2b-256 8a4d4c36cf01f61ea9d9a201978433c5c276b07c9ed42d647b8b6e18ed49e859

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: vamphost-1.3.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 109.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for vamphost-1.3.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 627f34971956df9866f41d056fec98a9178176020d74dc94a2d07f86a7d2432f
MD5 bef09fb8150bd3c516edd9d2c659761b
BLAKE2b-256 11d83d04354fb99f76fda7ab559e317cb6642809ff6ae6297418c6b2eb178bdc

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp312-cp312-win32.whl.

File metadata

  • Download URL: vamphost-1.3.2-cp312-cp312-win32.whl
  • Upload date:
  • Size: 93.3 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for vamphost-1.3.2-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 4810d6f4d3bce0ab2d2aec92f3c39c1d4e99d10387eed2fa34f7867534bb0816
MD5 495cc20159b0765891e098c1c94870e4
BLAKE2b-256 b89ba6f27822eafeae0bd25a810339ac79ff69ee9526576773b6120cd1f1a047

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 03d90ca6a59f58bfbaa0c3503dc0c0c975b395cc5e25bbd7aefdac77c26faf4b
MD5 f368363065efe47f83166ebf595da247
BLAKE2b-256 3e55538eec0117224c30be20964ed93a7b60b6602fc0b55b27f4c0bb93bf0bf8

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4c4cfdbfed79fab552f53b9a6456f0991c3fb607654d0faa87e5b7d823d7c3e
MD5 e66c90a7612d5afcd99afdbad2231758
BLAKE2b-256 6a75b34bab0284d71a5b28b211ac0e332aa37b7036aa8ba3eeb10288b0d0c278

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2b12850c0337f16c847fbf2f540d981872d7ba95e31a2db0ff7ef546ccab598f
MD5 e028d2aacb94ffe486e1d5ef796cb225
BLAKE2b-256 2679f516af6c18c2a1d5c1af9f81c94b15c1b03d0361a850e1e117f6c9c6e272

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: vamphost-1.3.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 108.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for vamphost-1.3.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 826c56e857694a30f231f2f0836af7dede69954fad32e613f8b36c7e0a9b78cc
MD5 f93404cd3787f4469a54be51cdd72002
BLAKE2b-256 5fa882dd5d554428ba40bb748d7bc3cde2632c62bea6354642144c7731712f90

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp311-cp311-win32.whl.

File metadata

  • Download URL: vamphost-1.3.2-cp311-cp311-win32.whl
  • Upload date:
  • Size: 93.3 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for vamphost-1.3.2-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 c5db9d37619da7716cea2eb8a76cdc275a05a3d38b11c91292fe93065a42ba23
MD5 2e2f84ed29d63f2891c48448740bb459
BLAKE2b-256 28cf6b0f3b8d7f226aa4a1e0302d90c6c648b1b16f448f6e24ca0e029d3eb46f

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a599cc875e906cc847062f894ebb98dccf204245bfcd035139a61a3e9a506d3d
MD5 ef9f51026e5f63166b29ae9d1dcd7d82
BLAKE2b-256 18a76a841558d60777a193a2b8708690387dfe0954a20741671dc1bf1a254db8

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8472b8fccf79b7d306a330d5292d712049b19275710a17f5af29084e1e65e73
MD5 8bb7912f7eb670704907716618291e2b
BLAKE2b-256 170cdf3d8740017dce9f6be65bfd8a0ced94143daf927a69b2c3591e144e5865

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 09cf8733e85c210bd370e1f448a46eba5a704685332277543eada796beab8e7d
MD5 42793ce8c7d10dd4c20ea344861f1e60
BLAKE2b-256 24a9c0596814aeeeceb792134f53c1249311024fce68c3ea1fc7e01791411ad8

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: vamphost-1.3.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 108.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for vamphost-1.3.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 26f877995135d6d27c8587fdd38025c755b0543771d08b9a5b0c7d2b0dbe1422
MD5 4cb90ce0324f6cd7f5cd4182904253ba
BLAKE2b-256 061472bb3322a5f0be59820a47e8c77d76fc8448157c865c7e4320b992ec0f37

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp310-cp310-win32.whl.

File metadata

  • Download URL: vamphost-1.3.2-cp310-cp310-win32.whl
  • Upload date:
  • Size: 93.2 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for vamphost-1.3.2-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 3649ce0848bd382907512cee6e753e43650492b8da530811497a1147b3643f0d
MD5 1c884791354735282a0610d40d466676
BLAKE2b-256 ab36e220a4e8c9de0b7b75da1924ddc5353ec149d13869de23d2f7b65eb2bd35

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c91e78b75969220c5b5e9cf0f955621a941297ecb73e609d32472c71bdfb1b02
MD5 86acb8205337390b5be6c8de58f9d146
BLAKE2b-256 e65d4795e97fe84c05985babb97cd55b54ca9adb990359db96b7abb6b09c9c4f

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d7eed7a62f615a47856cecf40f9ff660a5ae041971ee63a2f2c9d0f263f0397
MD5 ffaaf0b97dd923f931e73386fa06e6db
BLAKE2b-256 bd3c81b83bdc572f7dc2491e5f0a91d80ce04783dc52808374cb095bdc8599f5

See more details on using hashes here.

File details

Details for the file vamphost-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7a173083117fc72647739072dd5bc474324b0c739ee81697ff9cc208ed121505
MD5 91091cc1f93a14db38b624d282e174e5
BLAKE2b-256 b249b853b5bf45211eee314badf3dd7721176609211fef6495921c120ea8cc65

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