> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voicemark.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quality scoring

> How VoiceMark scores enrollment audio and when to prompt re-recording.

Before storing a voiceprint, `/v1/enroll` runs a 3-layer quality gate. If any layer fails, the request returns a 400 error. If all pass, `quality_score` indicates how strong the enrollment was.

## Three-layer gate

| Check | Error code |
| - | - |
| Minimum duration | `AUDIO_TOO_SHORT` |
| Minimum signal energy | `AUDIO_TOO_QUIET` |
| Minimum voice identity signal | `LOW_VOICE_SIGNAL` |

## Quality score

`quality_score` is a 0–1 composite returned when all three checks pass. It reflects duration and signal energy relative to optimal enrollment conditions.

| Score | Meaning | Action |
| - | - | - |
| 0.8–1.0 | Excellent | Proceed |
| 0.4–0.8 | Acceptable | Proceed; optionally prompt improvement |
| \< 0.4 | Poor | Prompt re-record |

## UI guidance

```typescript theme={null}
const enroll = await vm.enroll(blob, userId);

if (enroll.quality_score < 0.4) {
  showMessage("Recording too quiet — move closer to the mic and try again.");
} else if (enroll.quality_score < 0.8) {
  showMessage("Good. For best results, record 5+ seconds in a quiet space.");
} else {
  showMessage("Voice enrolled successfully.");
}
```

## Why it matters

A low-quality voiceprint raises the false rejection rate on future verifications. Users enrolled in noisy environments or with very short clips are more likely to fail verification later, even when their voice is genuine.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.