Skip to main content

Heimdall Sound

Convert your audio data into structured, tabular datasets ready for modeling.

API Specifications

Endpoint

POST https://sound.heimdallapp.org/sound/v1/api/process

Request Headers

  • x-api-key - API key that is issued when the endpoint is configured.
  • x-username - Username associated with your account.
tip

All request headers are required.

Lost Key

API Keys are issued one time and cannot be retrieved. If you lose your API key, please disable the endpoint in the sound page and reconfigure to get a new API key.

Request Body

  • file - The audio file you want to analyze
warning

Valid images formats: .WAV, .MP3, .OGG, and .FLAC

Response Object

  • filename - The name of the file passed in

  • zero_crossing_rate - The average zero-crossing rate which is a measure of how many times the signal changes from positive to negative (crosses zero) or vice versa in a given time frame.

  • root_mean_squared_energy - The average root mean squared energy which is a measure of the energy or amplitude of an audio signal

  • mean_chroma - The chroma feature which represents the twelve different pitch classes (e.g., C, C#, D, etc.) present in the audio signal over time

  • mean_spectral_centroid - The average spectral centroid which is a measure of where the center of mass of the spectrum of the audio signal is located in terms of frequency.

  • mean_spectral_bandwidth - The average spectral bandwidth which measures the width of the spectrum of the audio signal and provides information about how spread out or concentrated the frequencies are in the signal

  • mean_melFreq_cepstral_coeff - The mel-frequency ccepstral coefficients which capture important information about the spectral characteristics of the signal in a way that is often robust to variations in background noise and other factors.

  • mean_spectral_contrast - The average spectral contrast is a feature that quantifies the difference in amplitude between peaks and valleys in the spectrum of the audio signal

  • mean_tonnetz - The average tonnetz features which are used to capture the tonal characteristics or harmonic content of audio signals

  • mean_spectral_rollof - The average spectral roll-off which is a measure of the frequency below which a certain percentage of the total spectral energy lies

  • mean_spectral_flatness - The average spectral flatness which is a measure that quantifies how noise-like or tonal a signal is in the frequency domain

  • harmonic_to_noise_ratio - The average harmonic to noise ratio which the ratio between periodic and non-periodic components of a speech sound.

  • tempo - The tempo (in BPM) and beat positions from the onset strength envelope

  • spectral_crest - The average spectral crest which measures the ratio between the highest spectral magnitude value (the peak) and the average spectral magnitude value across a particular frequency range or within a certain frequency bin.

  • spectral_flux - The average spectral flux which measures how quickly the magnitudes of the frequency components in the signal change from one time frame to the next.

Sound response object
{
"filename": "Here Comes The Sun (2019 Mix).mp3",
"zero_crossing_rate": 0.08692828724759315,
"root_mean_squared_energy": 0.16259640455245972,
"mean_chroma": 0.3760714828968048,
"mean_spectral_centroid": 2378.3733240459655,
"mean_spectral_bandwidth": 2635.0513470928413,
"mean_melFreq_cepstral_coeff": 2.7573599815368652,
"mean_spectral_contrast": 23.91176304365735,
"mean_tonnetz": 0.004137341670639471,
"mean_spectral_rollof": 5338.104747134049,
"mean_spectral_flatness": 0.01791081205010414,
"harmonic_to_noise_ratio": 0.16644200205590418,
"tempo": 129.19921875,
"spectral_crest": 2.693505277130084,
"spectral_flux": 1.3702337741851807
}
422 Unprocessable Entity

You will receieve a 422 error your request body structure is incorrect.

Sample Request

Use the below sample request in Python to get started.

warning

You need to fill in your specific header values.

Python Request
import requests

url = 'https://sound.heimdallapp.org/sound/v1/api/process'
headers = {
'X-api-key': 'YOUR-API-KEY',
'X-username': 'YOUR-USERNAME',
}

files = {
'file': ('audio.wav', open('/path/to/your/audio/file.wav', 'rb'), 'audio/wav')
}

response = requests.post(url, headers=headers, json=data)