# Vocal or instrumental

> Tell vocal tracks from instrumentals, measured from a separated vocal stem.

Stores and playlists treat vocal tracks and instrumentals differently, and releases often get it wrong. activQC
tells them apart by **measuring**: it splits an excerpt of the track into stems and compares the vocal stem with the
mix. Nothing is guessed from the title.

```bash
curl -s -X POST "$ACTIVQC_BASE_URL/v1/audio/classifications" \
  -H "Authorization: Bearer $ACTIVQC_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "tracks": [
        { "track_id": "a1", "audio": { "url": "https://cdn.example.com/rain.wav" } },
        { "track_id": "a2", "audio": { "upload_id": "upl_7Gx2" } }
      ] }'
```

Send 1 to 20 tracks. The batch runs in the background. Wait for `audio.classification.completed`, or ask
`GET /v1/audio/classifications/{id}`:

```json
{
  "id": "ac_9fK2mX",
  "object": "audio.classification",
  "status": "completed",
  "tracks": [
    { "track_id": "a1", "status": "completed", "classification": "instrumental", "vocal_level_db": -31.4, "confidence": "high" },
    { "track_id": "a2", "status": "completed", "classification": "vocal", "vocal_level_db": -9.8, "confidence": "high" }
  ]
}
```

`vocal_level_db` is how loud the separated vocals are against the whole mix. A track that sits between the two
thresholds is answered with `confidence: "low"`: a quiet vocal hook, or a heavily processed voice. A batch where
some tracks could not be read ends `partial`, with an `error` on those tracks.
