sherlock.
EVIDENCE / MODULE REFERENCE

Voiceprint

Collect voice authenticity and speaker identity evidence independently from credential authentication.

Direct API: POST /api/v1/modules/voiceprintManage API keys ↗View code boilerplate ↗

When to use it

Add spoof detection and speaker verification to your voice call, IVR, or risk pipeline without replacing symbolic credentials.

Supported Operations & Data Contracts

Call this module with a key scoped to 'voiceprint'. Provide the operation name and matching input dictionary.

detect · Voice Authenticity & Spoof DetectionPOST /api/v1/modules/voiceprint

Analyzes audio to detect synthetic speech, deepfakes, replays, and voice cloning.

Input Parameters

FieldTypeRequirementDescription
audiostring (base64)RequiredMono PCM16 WAV audio at 8kHz or 16kHz under 4 MiB.
consentboolean (true)RequiredExplicit end-user biometric processing consent confirmation.

Output Fields

FieldTypeDescription
status'PASS' | 'FAIL' | 'UNCERTAIN'Voice authenticity assessment result.
scorenumber (0-100)Confidence score that the audio is genuine live human speech.
referencestringAudit trace reference for this detection check.

Example Request Payload

JSON Request BodyContent-Type: application/json
{
  "operation": "detect",
  "input": {
    "audio": "BASE64_PCM16_WAV_AUDIO",
    "consent": true
  }
}

Example Response

JSON Response (HTTP 200)Cache-Control: no-store
{
  "module": "voiceprint",
  "output": {
    "status": "PASS",
    "score": 96,
    "reference": "det_982bf7a1"
  }
}

verify · 1:1 Speaker VerificationPOST /api/v1/modules/voiceprint

Compares caller voice audio against a previously enrolled speaker alias.

Input Parameters

FieldTypeRequirementDescription
audiostring (base64)RequiredMono PCM16 WAV audio sample under 4 MiB.
consentboolean (true)RequiredUser biometric consent confirmation.
speakerIdstringRequiredOwner-scoped speaker alias created during enrolment.

Output Fields

FieldTypeDescription
status'MATCH' | 'NO_MATCH' | 'UNCERTAIN'Biometric identity verification outcome.
scorenumber (0-100)Similarity score comparing audio to speaker voice profile.
referencestringAudit trace reference for verification attempt.

Example Request Payload

JSON Request BodyContent-Type: application/json
{
  "operation": "verify",
  "input": {
    "audio": "BASE64_PCM16_WAV_AUDIO",
    "consent": true,
    "speakerId": "cust_user_42"
  }
}

Example Response

JSON Response (HTTP 200)Cache-Control: no-store
{
  "module": "voiceprint",
  "output": {
    "status": "MATCH",
    "score": 91,
    "reference": "ver_331ec4f2"
  }
}

enrol · Speaker Voice EnrolmentPOST /api/v1/modules/voiceprint

Registers a new speaker profile with 15–60 seconds of reference audio under your account.

Input Parameters

FieldTypeRequirementDescription
audiostring (base64)Required15 to 60 seconds of clean mono PCM16 WAV reference speech.
consentboolean (true)RequiredUser biometric consent confirmation.
speakerIdstringRequiredUnique speaker alias (alphanumeric, hyphens, underscores; max 64 chars).
namestringOptionalOptional display label for this speaker.

Output Fields

FieldTypeDescription
speakerIdstringRegistered speaker alias bound to your workspace.
statusstring ('enrolled')Enrolment success status indicator.
audioHashstringSHA-256 digest of raw audio sample stored for audit reconciliation.

Example Request Payload

JSON Request BodyContent-Type: application/json
{
  "operation": "enrol",
  "input": {
    "audio": "BASE64_WAV_20S",
    "consent": true,
    "speakerId": "cust_user_42",
    "name": "Alice Sharma"
  }
}

Example Response

JSON Response (HTTP 200)Cache-Control: no-store
{
  "module": "voiceprint",
  "output": {
    "speakerId": "cust_user_42",
    "status": "enrolled",
    "audioHash": "f3c8a1b9..."
  }
}

speaker_delete · Delete Speaker ProfilePOST /api/v1/modules/voiceprint

Permanently removes a speaker voiceprint profile and registers an irreversible tombstone.

Input Parameters

FieldTypeRequirementDescription
speakerIdstringRequiredSpeaker alias to delete.

Output Fields

FieldTypeDescription
speakerIdstringDeleted speaker alias.
deletedboolean (true)Deletion confirmation flag.

Example Request Payload

JSON Request BodyContent-Type: application/json
{
  "operation": "speaker_delete",
  "input": {
    "speakerId": "cust_user_42"
  }
}

Example Response

JSON Response (HTTP 200)Cache-Control: no-store
{
  "module": "voiceprint",
  "output": {
    "speakerId": "cust_user_42",
    "deleted": true
  }
}

credits · Inspect Biometric Quota & AttemptsPOST /api/v1/modules/voiceprint

Reports provider availability and your account's daily attempts for each operation.

Output Fields

FieldTypeDescription
providerAvailablebooleanWhether upstream biometric provider has active capacity.
usagearrayList of operation counts used today under your key.
windowstring ('UTC day')Daily counter quota window.

Example Request Payload

JSON Request BodyContent-Type: application/json
{
  "operation": "credits",
  "input": {}
}

Example Response

JSON Response (HTTP 200)Cache-Control: no-store
{
  "module": "voiceprint",
  "output": {
    "providerAvailable": true,
    "usage": [
      {
        "operation": "detect",
        "attempts": 14
      },
      {
        "operation": "verify",
        "attempts": 8
      }
    ],
    "window": "UTC day"
  }
}

Configuration in Graph Builder

When adding Voiceprint into a visual component or graph workflow, configure its node runtime settings in the builder inspector:

Position Voiceprint immediately after your voice ingress or root entry. In downstream Policy node settings, map 'bindings.authenticity' to the Voiceprint node's 'status' output, and 'bindings.identity' to its 'status' output when verifying.

Direct API Code Examples

Invoke this module directly from your backend services without passing through the visual builder:

TypeScript / Node.js (Fetch)index.ts
const response = await fetch("https://api.sherlock.dev/api/v1/modules/voiceprint", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.SHERLOCK_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    operation: "detect",
    input: {
      audio: fs.readFileSync("sample.wav").toString("base64"),
      consent: true,
    }
  }),
});
const { output } = await response.json();
console.log("Authenticity:", output.status, "Confidence:", output.score);
cURL / Bashterminal
curl -X POST "$SHERLOCK_BASE_URL/api/v1/modules/voiceprint" \
  -H "Authorization: Bearer $SHERLOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operation":"detect","input":{"audio":"$BASE64_AUDIO","consent":true}}'

Current Boundaries & Guarantees

Operations: detect, verify, enrol, speaker_delete, credits. Speaker aliases are isolated by API key owner. Daily per-owner attempt limits protect provider credit guards. No voice evidence grants authorization directly.

Related Trust Modules