AI-Generated Music Detection
BETA ai_musicDetect if a music track was generated by an AI model such as Suno, Udio and more.
This model is available on the Pro and Enterprise plans. See pricing for details.
Overview
The AI-Generated Music Detection Model can help you determine if a music track was entirely generated by an AI model, or if it is real music. This model was trained on artificially-created and human-created music spanning all sorts of music styles such as pop, rock, electronic, classical, jazz and more.
The Model works by analyzing the acoustic content of the audio. No meta-data is used in the analysis. Tampering with meta-data therefore has no effect on the scoring.
The Model was trained to detect music generated by the main models currently in use: Suno, Udio, Riffusion... Additional models will be added over time as they become available. The model works best on audio files with no vocals.
Use cases
- Music recommendation filtering
- Music tagging and archiving
- Copyright and Royalty tracking
- Content moderation
Related model
The following model can provide a useful complement to the AI-generated music model:
- AI speech Detection: Detect AI-generated speech.
- AI video Detection: Detect AI-generated videos.
Use the model
Detect if an audio file was AI-generated
To analyze a music track, simply send a POST request with the audio file. Supported audio formats: OGG, OPUS, FLAC, WAV, MP3, M4A, WEBM.
curl -X POST 'https://api.sightengine.com/1.0/audio/check.json' \
-F 'audio=@/path/to/audio.mp3' \
-F 'models=ai_music' \
-F 'api_user={api_user}' \
-F 'api_secret={api_secret}'
# this example uses requests
import requests
import json
params = {
'models': 'ai_music',
'api_user': '{api_user}',
'api_secret': '{api_secret}'
}
files = {'audio': open('/path/to/audio.mp3', 'rb')}
r = requests.post('https://api.sightengine.com/1.0/audio/check.json', files=files, data=params)
output = json.loads(r.text)
$params = array(
'audio' => new CurlFile('/path/to/audio.mp3'),
'models' => 'ai_music',
'api_user' => '{api_user}',
'api_secret' => '{api_secret}',
);
// this example uses cURL
$ch = curl_init('https://api.sightengine.com/1.0/audio/check.json');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$response = curl_exec($ch);
curl_close($ch);
$output = json_decode($response, true);
// this example uses axios and form-data
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
data = new FormData();
data.append('audio', fs.createReadStream('/path/to/audio.mp3'));
data.append('models', 'ai_music');
data.append('api_user', '{api_user}');
data.append('api_secret', '{api_secret}');
axios({
method: 'post',
url:'https://api.sightengine.com/1.0/audio/check.json',
data: data,
headers: data.getHeaders()
})
.then(function (response) {
// on success: handle response
console.log(response.data);
})
.catch(function (error) {
// handle error
if (error.response) console.log(error.response.data);
else console.log(error.message);
});
See request parameter description
| Parameter | Type | Description |
| audio | file | audio file to analyze |
| models | string | comma-separated list of models to apply |
| api_user | string | your API user id |
| api_secret | string | your API secret |
API response
The API will then return a JSON response with the following structure:
{
"status": "success",
"request": {
"id": "req_0zrbHDeitGYY7wEGncAne",
"timestamp": 1491402308.4762,
"operations": 15
},
"type": {
"ai_music": 0.01
},
"media": {
"id": "med_0zrbk8nlp4vwI5WxIqQ4u",
"uri": "music.mp3"
}
}
The JSON response contains the ai_music score. This score is a float between 0 and 1. The higher the value, the higher the confidence that the audio is AI-generated.
Additional information can be provided, such as a breakdown of the score by time segments. Please contact sales for more details.