Skip to main content

Python Vamp plugin host

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.

Metadata

Release files for vamphost 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vamphost 1.4.0
File
vamphost-1.4.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
vamphost-1.4.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
vamphost-1.4.0-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
vamphost-1.4.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
vamphost-1.4.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
vamphost-1.4.0-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
vamphost-1.4.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
vamphost-1.4.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
vamphost-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
vamphost-1.4.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
vamphost-1.4.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
vamphost-1.4.0-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details

Total release size: 11.1 MB

Release files / vamphost-1.4.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL vamphost-1.4.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2b65d82117623c640812ae5b30ee8a78897e2c5ee6a63567c5ec63e0cf1896ad
BLAKE2b-256 checksum
How to use checksums
8b53a574189d98c190b88f0872ac03fed006850bd2f4333b559821c3a2de12e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / vamphost-1.4.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL vamphost-1.4.0-cp313-cp313-macosx_11_0_arm64.whl
Size 291.4 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
65d6c90cd296e6cd68b8b26b044975136dfb23d95dc5887783bdc79d1403a41d
BLAKE2b-256 checksum
How to use checksums
c869dfb01e6af9c9d92ceb074f08969d902ec1e5349c76708400cd2835ef5500
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / vamphost-1.4.0-cp313-cp313-macosx_10_13_x86_64.whl

Download URL vamphost-1.4.0-cp313-cp313-macosx_10_13_x86_64.whl
Size 295.5 kB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
a68f0994237e0e1a03e7c91f1c4bee36b8fd837f27e373b479419109b298bd5e
BLAKE2b-256 checksum
How to use checksums
0fa388e6503c9f6dd6cba8bc05bc27c634bfe3a9610e2490cc99937f85d86d95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / vamphost-1.4.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL vamphost-1.4.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a7a1e39f0808f570eb5f23769310d9b7bfef5ce50f2e5a981e0cba6d60b6632f
BLAKE2b-256 checksum
How to use checksums
dea2565542a8cf04cf7814f726616afc7a057a17f7b3dc3409a140e868af4327
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / vamphost-1.4.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL vamphost-1.4.0-cp312-cp312-macosx_11_0_arm64.whl
Size 291.4 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6db8fcb7758b2988916a71f828e23e43733a6e219fcc4a186bf2079976b55b13
BLAKE2b-256 checksum
How to use checksums
e6d2cccb6ab04207ebbe4ac48d3e2de62096e51b4c36f692a6987041bcf27a98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / vamphost-1.4.0-cp312-cp312-macosx_10_13_x86_64.whl

Download URL vamphost-1.4.0-cp312-cp312-macosx_10_13_x86_64.whl
Size 295.5 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
82cc1179dc2230045eec57a7d59410bbd77e19c51d36504b5f6f4f4c03e6136a
BLAKE2b-256 checksum
How to use checksums
9c91ef46bf104c1bcd3c521f278f635a3ec55f06516ba1d68ca64cd2b64a30ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / vamphost-1.4.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL vamphost-1.4.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cf70f7b78091c86e5861c624b8ea498417aa8ebc8aab5b9826023f6af8da3744
BLAKE2b-256 checksum
How to use checksums
7784f4fd5e658e6db7c46fd512fded0e97011351b1028ec500a3d3d0f9a4e2c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / vamphost-1.4.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL vamphost-1.4.0-cp311-cp311-macosx_11_0_arm64.whl
Size 291.2 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8fac671e8cb92448f96ee7b234a5ec9da855d441a5acbb6e0edd42e6e688977f
BLAKE2b-256 checksum
How to use checksums
91f62fd9c8f35081e3935475f328e70eb4980ac8c018deadd74db8d63015f188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / vamphost-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl

Download URL vamphost-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl
Size 295.0 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
c064eb420ad51ea080ed03cc1ab6c4f8b7f8d7ae31ab96b3b082ddc9f6b72d2c
BLAKE2b-256 checksum
How to use checksums
c81cfcd10440619ae302c8eee6483b0ebad78b33718c8ec29ec3f0e497b8555f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / vamphost-1.4.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL vamphost-1.4.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4241e3acf40e380bc977955623f792fe213d940917730d3f42145356388892a6
BLAKE2b-256 checksum
How to use checksums
f817f192c034b78f1d1acb1a80ab091f28d60b7eb72ac267f09e7691e62410e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / vamphost-1.4.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL vamphost-1.4.0-cp310-cp310-macosx_11_0_arm64.whl
Size 291.2 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c1fd273e98a5caf9dab9057653fbfb37eb5bc5bb14a6c525b9d3377e1e8aded2
BLAKE2b-256 checksum
How to use checksums
1b0824f7c2be00a10ec8f3e1914d5a9623af6e50b3b5a9dd8758447b194bb93b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / vamphost-1.4.0-cp310-cp310-macosx_10_9_x86_64.whl

Download URL vamphost-1.4.0-cp310-cp310-macosx_10_9_x86_64.whl
Size 295.0 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
ca025a5b8470495cb46dc5d39177e4f190af9eec9b6658618bb1a874058bbb80
BLAKE2b-256 checksum
How to use checksums
a0abbd066a350100828f7f3aa1fee924d159050df8de01c3dc11b008752c22f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

1.4.0 This release

12 release files

1.3.2

20 release files

1.3.1

20 release files

1.3.0

20 release files

1.2.1

15 release files

1.2.0

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page