Skip to content

Music SDK

The Vermillio Music SDK is a Python library designed to allow for developers to programmatically interact with the Vermillio platform.

Installation

Vermillio Music SDK is published as a Python package and can be installed ideally within a virtual environment. Vermillio Music SDK requires Python 3.9+.

pip install vermillio-sdk[music]
uv add vermillio-sdk[music]

Configuration

The client loads credentials from environment variables by default:

  • VERMILLIO_SDK_CLIENT_ID : Client id provided by Vermillio
  • VERMILLIO_SDK_CLIENT_SECRET : Client secret provided by Vermillio

For full documentation, see Authentication for a more detailed description.

Initialization

All of the classes for Music SDK live under vermillio.sdk.music. Here is an example usage:

from vermillio.sdk.music import VermillioMusicAIDetect, AIDetectExternalSource

ai_detect = VermillioMusicAIDetect() # The default behavior is to pull from env
# alternatively a VermillioConfig class can be provided
# ai_detect = VermillioMusicAIDetect(VermillioConfig.credentials(client_id, client_secret))

result = ai_detect.run_results(
    AIDetectExternalSource(path="https://download.samplelib.com/mp3/sample-15s.mp3")
)

if result and result.status == 'Succeeded':
    for detection in result.results.detections:
        confidence = f"({detection.confidence:0.2f})" if detection.confidence else "--"
        print(f"[{detection.query_segment.start:0.2f}-{detection.query_segment.end:0.2f}] {detection.label} {confidence}")