A synthetic verdict on its own separates rows one and two, which need the same handling. Behavior detections on their own separate rows three and four from the rest, but lose the escalation signal that a cloned voice carries. This page runs both models on one recording and combines the outputs into a single decision.
Before starting
1
Set your API key
2
Get a call recording in a shared format
Velma Triage batch accepts Maximum file size is 100 MB on both endpoints.
.aac, .aiff, .flac, .mov, .mp3, .mp4, .ogg, .opus, .wav, and .webm. Deepfake Detection batch accepts those plus .3gp, .3gpp, .amr, .au, .m4a, and .wma. Velma’s list is the binding constraint for a file sent to both.Phone and voicemail recordings are often .m4a, which Velma Triage rejects. Convert first:3
Install the Python dependency
The
curl examples need nothing else.Step 1: Classify the voice
Which endpoint classifies the voice depends on how the call was recorded.
The rest of this step covers the dedicated endpoint. For the transcription signal instead, skip to Step 2 and enable
stt.deepfake_signal there.
Aggregate the frames into one verdict
The response is a timeline, not a clip-level verdict. Screening needs one value, so compute it:- Drop
no-contentframes. They are silence, classified before inference rather than by the model, and counting them dilutes the result on a call with hold time. - Weight by frame duration rather than counting frames, so a trimmed final frame does not carry the same weight as a full 4-second one.
- Divide synthetic speech time by total speech time.
- Compare against a threshold.
Worth knowing:
0.5 is a starting point, not a value the API defines. Real recordings carry IVR prompts, hold music, and transfers, so a partial share is common and a clip is rarely 0% or 100%. Set the threshold against your own labelled audio and your tolerance for false positives.frames still covers the full duration, and the per-frame timestamps locate a synthetic segment rather than only reporting that one exists.
Step 2: Analyze the behaviors
Velma Triage evaluates a configured set of behaviors against the transcript. Nothing is evaluated unless thebehaviors array names it, so fraud screening starts by choosing which signals to turn on.
These seven presets from the Fraud Detection and Prevention package are the fraud tactics themselves:
detected: false means Velma checked and found nothing, not that the check was skipped. evidence_clip_uuids and definitive_clip_uuid index into clips, which is how the snippet above prints the words that triggered each detection. See Velma Triage for the full response shape.
Worth knowing: the fraud package holds 18 presets, and 11 of them are context and outcome signals rather than fraud tactics.
preset:complaints, preset:issue_resolved, and preset:refund_or_credit_issued describe how a call went, and firing on them is not evidence of fraud. Split the list by what each signal means before wiring detections to an action.Move to the full package
The seven presets above run without any other configuration. The full package adds 25 conversation types and 14 participant roles, which constrain what Velma infers about the call and improve role attribution on support calls. Downloadfraud-detection-and-prevention.json from the package page and send it as the config value:
422, so confirm the set available to you before pinning a list:
Step 3: Combine the two outputs
Each model contributes one axis of the decision.behavior_uuid, which is stable across catalog updates. Filtering on behavior_name breaks when a display name is reworded.
Screening output for a cloned voice running an account-takeover script
Screening output for a cloned voice running an account-takeover script
Build a test matrix
Two synthetic recordings are enough to see that behavior analysis separates them, and not enough to set a threshold. Cover all four quadrants, because each one fails differently.1
Record a natural-speech control
Ten seconds of your own voice, converted with the
ffmpeg command above. Deepfake Detection should return non-synthetic across the speech frames. A control that comes back synthetic means the format or the pipeline needs checking before any other result is worth reading.2
Generate synthetic samples matching your threat model
Text-to-speech output exercises the detection path but is not what a motivated attacker uses. Test against the voice-cloning tools relevant to the accounts you protect.
3
Use real call recordings
Consented, compliant recordings from your own environment carry the codecs, channel counts, hold music, and transfers that synthetic test clips do not. Thresholds tuned on clean studio audio move once real calls arrive.
4
Include benign fraud-adjacent calls
A frustrated customer who cannot remember which email they signed up with produces some of the same acoustic markers as feigned ignorance. These calls set your false-positive rate.
Before trusting the result
Concurrency is capped per model, and the default is 3 in flight against one endpoint. Screening a backlog runs two endpoints, so bound each with its own semaphore rather than retrying into a full queue. A rejected request returns429 on both, and the detail field distinguishes a full queue from exhausted credits. Match on detail rather than on the status alone. See Limits.
Deepfake Detection classifies acoustically and reports no reason for its verdict. Velma Triage returns reasoning and evidence clips for every detection, which is what an analyst reviewing a flagged call can act on. Route synthetic-voice verdicts to a queue where a human sees the transcript, not to an automatic block.
Related
- Deepfake Detection, both endpoints and how the frame verdicts compare with the transcription signal
- Velma Triage, the full configuration reference for batch and streaming
- Fraud Detection and Prevention, all 18 presets with detection criteria
- Using behaviors, listing the catalog and writing custom definitions
- Which API should I use?, the choice between endpoints that return overlapping signals