Skip to main content

Parameters

Biometric Redaction Parameters

biometric-age
string
default:"young-adult"
Biometric age group to apply to the anonymized voice identity. Only used when avatar is not provided. Allowed values:
  • young-adult (18–39)
  • middle-aged-adult (40–59)
  • senior-adult (60+)
  • same
  • random
gender
string
default:"random"
Target gender of the anonymized voice identity. Allowed values:
  • same
  • opposite
  • random
  • f
  • m
language
string
default:"en"
Target language of the audio file. Allowed values:
  • en
  • fr
  • it
  • es
  • de
model_id
string
default:"mini"
Model variant for biometric voice print redaction. Allowed values:
  • mini 0.25 RTF
  • advanced 0.75 RTF
emotion
string
Optional emotion to apply to avatar identity.

Example Curl Usage

✅ Minimal biometric redaction request (uses defaults)

curl -X POST https://voiceharbor.ai/api/speech-to-speech-biometric-redaction \
  -H "Authorization: Bearer YOUR_USAGE_TOKEN" \
  -F "source_audio=@./martin.wav;type=audio/wav" \
  --output result.wav

🎯 Custom biometric request

curl -X POST https://voiceharbor.ai/api/speech-to-speech-biometric-redaction \
  -H "Authorization: Bearer YOUR_USAGE_TOKEN" \
  -F "source_audio=@./martin.wav;type=audio/wav" \
  -F "model_id=advanced" \
  -F "biometric-age=same" \
  -F "gender=opposite" \
  -F "emotion=sad" \
  -F "language=fr" \
  --output redacted_fr.wav

⚠️ Possible API Errors

HTTP CodeError ConditionMessage
400Invalid field value or combination (generic validation)Descriptive error string
400Missing required body field fileName or audio_duration"Missing fileName or audio_duration"
400audio_duration invalid / out of bounds (>0 and ≤3600)"Invalid audio_duration"
400Missing audio upload"Missing audio file"
400Multer rejected file by MIME/extension"Invalid file type"
400Magic-bytes audio check failed"Invalid or unsupported audio format (magic check failed)"
400Invalid model_id"Invalid model_id. Allowed: mini, advanced"
400Invalid language"Invalid language. Allowed: en, fr, it, es, de"
400Invalid biometric-age"Invalid biometric-age. Allowed: young-adult, middle-aged-adult, senior-adult, same, random"
400Invalid gender"Invalid gender. Allowed: same, random, opposite, f, m"
400Invalid emotion"Invalid emotion. Allowed: sad, happy, default"
401Missing or malformed Authorization header (general)"Missing Authorization"
401Missing or malformed Authorization header (proxy endpoint)"Missing Authorization header"
403Invalid developer/usage token"Invalid token"
403Invalid admin token (or expired/unsigned legacy admin token)"Invalid admin token"
403CORS rejection for disallowed browser Origin{ "error": "CORS" }
413Uploaded file exceeds configured size"File too large"
429Rate limit exceeded"Too many requests, please slow down"
500DB failure"Database error"
500Proxy/upstream/network/timeout error"Anonymisation failed"
503Readiness DB check failed{ "ready": false }
I