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

vamphost-1.3.1-cp312-cp312-win_amd64.whl (106.9 kB view details)

Uploaded CPython 3.12 Windows x86-64

vamphost-1.3.1-cp312-cp312-win32.whl (91.5 kB view details)

Uploaded CPython 3.12 Windows x86

vamphost-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

vamphost-1.3.1-cp312-cp312-macosx_11_0_arm64.whl (130.7 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

vamphost-1.3.1-cp312-cp312-macosx_10_9_x86_64.whl (138.6 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

vamphost-1.3.1-cp311-cp311-win_amd64.whl (106.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

vamphost-1.3.1-cp311-cp311-win32.whl (91.3 kB view details)

Uploaded CPython 3.11 Windows x86

vamphost-1.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

vamphost-1.3.1-cp311-cp311-macosx_11_0_arm64.whl (130.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

vamphost-1.3.1-cp311-cp311-macosx_10_9_x86_64.whl (138.4 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

vamphost-1.3.1-cp310-cp310-win_amd64.whl (106.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

vamphost-1.3.1-cp310-cp310-win32.whl (91.3 kB view details)

Uploaded CPython 3.10 Windows x86

vamphost-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

vamphost-1.3.1-cp310-cp310-macosx_11_0_arm64.whl (130.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

vamphost-1.3.1-cp310-cp310-macosx_10_9_x86_64.whl (138.4 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

vamphost-1.3.1-cp39-cp39-win_amd64.whl (106.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

vamphost-1.3.1-cp39-cp39-win32.whl (91.3 kB view details)

Uploaded CPython 3.9 Windows x86

vamphost-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

vamphost-1.3.1-cp39-cp39-macosx_11_0_arm64.whl (130.7 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

vamphost-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl (138.4 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: vamphost-1.3.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 106.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vamphost-1.3.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2e5936c8b552e33d440e89d2f3380d192de7288a244676c758b159e7c1dcaccc
MD5 c59931eaa0f110abc9c804cdb598f67b
BLAKE2b-256 a724af730c422f82748c75d5e59766d579fe066e8423261dfde412aec9d1ec73

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vamphost-1.3.1-cp312-cp312-win32.whl
  • Upload date:
  • Size: 91.5 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vamphost-1.3.1-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 63d7dc4c40dcfda33a86e7a016379ff917f299164a86343d9434c30ddad983a4
MD5 666bf79c7932ca8baf00f9bb9e958f1a
BLAKE2b-256 f207e4ee1ef23e3cc5288f0fbd056d4c9c3b4c0bdea9354e7f787f1d9c3e5078

See more details on using hashes here.

File details

Details for the file vamphost-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 137aa93b416acfd5947837a35c575c320e618bb991cb3fbc747efd460081290d
MD5 0bacafa96290da554d438d8d7a5e54c1
BLAKE2b-256 5f8c551917960bcb3d48fd2855623b51b5f631d5ff5cca5695ff190874a6b539

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vamphost-1.3.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b2c074a23a35b9e31f938a62e78a4bf451f3bb3a0d41420e1acf5f24052bd8b6
MD5 5bb44c56f407642bbce824ad098c18b4
BLAKE2b-256 0cac036f196a433689bd1be758408764b1b0ee90d875baa3b8b4f40e3206adfd

See more details on using hashes here.

File details

Details for the file vamphost-1.3.1-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 79b11c185735df5bdec0bf7789b0c3d252552bdc0fa74015dbd280dc0b37da4f
MD5 4753e9b3cd50ed96627ef5fcb34551cb
BLAKE2b-256 15fa8929e0f59313fd3b7d38fe03137f51f0e220c7c5a89493bba6016938d180

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vamphost-1.3.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 106.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vamphost-1.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 08abf03f7888b15c461db7a6a1f8278686657e910dcd540caa22441ae34c7911
MD5 10ade0fb13c63782962ffc4a168b2ec2
BLAKE2b-256 a5f709df01174843b60f1af1401bd2915eeacc1ebdec0e1789e28404a84e4201

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vamphost-1.3.1-cp311-cp311-win32.whl
  • Upload date:
  • Size: 91.3 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vamphost-1.3.1-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 865cecbe68552391a5b16d783d78436cd1e4be5cbecfa2a790d7222202abcb0d
MD5 f136300e8a150a4f1cd837f57408cc5d
BLAKE2b-256 621418dec4d13451fc0212b83b6929b12ddcf31f3fc352a062abe3278d0bfe4a

See more details on using hashes here.

File details

Details for the file vamphost-1.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3568d2eebcdc13b5467a5941b962e56cade6c38c57af9b814ba55ca014fe575a
MD5 34bea45e4e42cbf8de5d71db9ad1617d
BLAKE2b-256 9e0026f551851e63b7e4f37d16a6a756e52ccff1dd248c81681fc2525cce8921

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vamphost-1.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a0dde97f77bd14eb6ebd9bc1e1acfd2625d9d678102183d89c160c286e4a526
MD5 b63c2bfc479ef489abed6398164998db
BLAKE2b-256 70533193a828dc92947be6f849dc799847296d2322d93885c10be00c00a32633

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vamphost-1.3.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e6336328cca749c91872ccd5aafeacafe3fa22fae9a9623b6c58a0378618fa54
MD5 91670538441670796192e64de20db716
BLAKE2b-256 dbc4f4ccfa0af680d9f6c8f4387a4720a5cc5062fb7daf7aa909b616f59a88f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vamphost-1.3.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 106.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vamphost-1.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 055278ef49de7c25939d911275d253a270d18e5d0065ab0db610e00639c61ce0
MD5 47aae864c920890bf266316f05838a19
BLAKE2b-256 fb7b44489e1fb0968780e9b1986d5b56521d9c5e3e1a2a2162d6899064d0df18

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vamphost-1.3.1-cp310-cp310-win32.whl
  • Upload date:
  • Size: 91.3 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vamphost-1.3.1-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 81066a650a9c62cd965056e21d30e6121a4f030b24432d043a61b31fa66a04ae
MD5 5cc9f393692509618950911f546cb7c8
BLAKE2b-256 03e99ecbc47391c9f9aabfdfd0a555bbbe15456e9ccf166de34a5ce7fb780ced

See more details on using hashes here.

File details

Details for the file vamphost-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 733f2c5ef3d11cce2b8ba795bd9fc73e69e07ae000505de71597a84591ebd7ed
MD5 3c8d04be60860c2d798422395e56e297
BLAKE2b-256 81aeac31b6d4fcf4ddf4ed845d86ebe6601087cc8861be89428034e857ff4c29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vamphost-1.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc324498a38bbf1c6e970547a429899434a9815a3a1b79f85ac21113a37be0a3
MD5 27d41536da661b5d5132fe5b41db9897
BLAKE2b-256 bb8ef17bed48e88d8bea85fb0c381bfb4e0845d96d13e5a56d4d1e19f5a97231

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vamphost-1.3.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 21f8c860134af4868df063ac56534181c29b5882367eb3b4202c87e0dd160d8b
MD5 c573795b020025ea6e8545ca05ea5b9d
BLAKE2b-256 e5e4b45ca8e60d9f11bfbf9760e6d77186124f97d434170c2af4bb9121ffc401

See more details on using hashes here.

File details

Details for the file vamphost-1.3.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: vamphost-1.3.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 106.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vamphost-1.3.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 77cf5b2e409cb9ba993f3d53d0ea42a3658925b946d543be85109078ae1469b7
MD5 6eb2b738601e00419c7aa867985dc58a
BLAKE2b-256 fb330d9148a47b1a4c983e8eb16785074ee8f2516a8f7b517a9e7f2ce95a0ad9

See more details on using hashes here.

File details

Details for the file vamphost-1.3.1-cp39-cp39-win32.whl.

File metadata

  • Download URL: vamphost-1.3.1-cp39-cp39-win32.whl
  • Upload date:
  • Size: 91.3 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vamphost-1.3.1-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 688024123a7a3248060c78889713713ac1d6a4abea9d6ca06139797d96dcc59f
MD5 bed4530ce0abcc308ce4eefd8a389fc4
BLAKE2b-256 0fe013c938ace47dc096640f46509e8875e5e990922d6a3ea451b42f819900e5

See more details on using hashes here.

File details

Details for the file vamphost-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 642cbe367ee820cb3f38f98384e2a82dd06a9f3f32a7ce39628dad56d4e1f717
MD5 696a173276727fd9581a705fcdf17dc6
BLAKE2b-256 02f5d8154eee06a9e46f0ca120a89eab64450f8b2a04738ed527128494eb27c2

See more details on using hashes here.

File details

Details for the file vamphost-1.3.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b5feb759e4c585a70dde0b8e70b272a32323ba4435d779351e71204a5b89e046
MD5 211787c128622945e979d1d3db2a7de3
BLAKE2b-256 d807555bfcbfe2f1768037955d5725733074d95a6d25d5805fa60409f305d02b

See more details on using hashes here.

File details

Details for the file vamphost-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for vamphost-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2309694ec526a4ced466eee40a838b1142c22872667c137856f5e489aa35eb59
MD5 cbfaf7bed5817e9c61f7359b56061daa
BLAKE2b-256 1aeff03cd8b1578cea3109808b343e90279c8d27e7ebafb34ce7c38f6714e225

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page