RapidAPI logo

Song Tempo Detection

FREE
By macgyverapi
Updated 4 months ago
-/10
Popularity Score
-
Latency
-
Success Rate

Song Tempo Detection API Documentation

This program analyzes an audio file and attempts to determine the tempo (in beats per minute) of that song.

Determining the tempo is not a straightforward process and requires a sophisticated algorithm to accurately detect.

For this program to be accurate the audio file should be a musical song with a consistent tempo. The program will accept a number of file types but works best with mp3 files.

Allowed file types: mp3 (.mp3) wav (.wav) aiff (.aif)

Being able to programmatically determine the tempo of a song will allow you to categorize audio files by tempo.

View API Details
POSTTempo Detection
POSTTempo Detection

Supply a reference to an audio file or song and this api will return a tempo in beats per minute.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
PayloadJSON_STRING
REQUIREDReference to an audio file
Code Snippet
unirest.post("https://macgyverapi-song-tempo-detection-v1.p.rapidapi.com/")
.header("X-RapidAPI-Host", "macgyverapi-song-tempo-detection-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"id":"6t7s5d7t","key":"free","data":{"audio_file":"https://askmacgyver.com/test/Maroon-128.mp3"}})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://macgyverapi-song-tempo-detection-v1.p.rapidapi.com/
Request Method: POST
Response Headers
Response Body
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://macgyverapi-song-tempo-detection-v1.p.rapidapi.com/")
.header("X-RapidAPI-Host", "macgyverapi-song-tempo-detection-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"id":"6t7s5d7t","key":"free","data":{"audio_file":"https://askmacgyver.com/test/Maroon-128.mp3"}})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication