Skip to main content
Voice is a research preview, live on judge.tenetlabs.com. The request and event shapes may change before general availability.
Voice guardrails: POST /voice/decide/stream → SSE events for one voice-agent turn, with the transcript verdict sent before the audio detectors run. The transcript is judged by the same injection + pii rails that judge text; the audio is judged directly by transcript-independent acoustic detectors. The two fuse most-restrictive-wins, so an alarming sound on the call can gate a benign transcript.

When to use it

Use it to guard a voice-AI agent — a LangChain voice agent whose turns you want judged before the agent acts or speaks. The endpoint is real-time SSE only (there is no sync voice endpoint): the transcript rails are the fast layer, so their fused verdict reaches the wire before the audio detectors run, and a barge-in / terminate decision can act at that point without waiting for the audio layers to resolve. For text agents, use /decide or verdict-first streaming — the voice endpoint adds transcript ingestion and the acoustic layer on top of the same verdict machinery.

Request

Send one span. Provide the turn’s text with the transcript shorthand, or a full voice_context when you also carry audio signal:

voice_context

  • transcript — the text the injection + pii rails scan. When it is empty and only audio_ref is present, the audio is transcribed first; with neither, the rails have nothing to scan.
  • asr_confidence — [0.0, 1.0], higher is more confident. null means unknown. Governs the ASR-confidence downgrade (below).
  • audio_ref — reference to the raw audio artifact (an s3:// URI or a media id); carried through, never inlined as bytes.
  • audio_events — bare provider event-tag strings (e.g. "scream", "(laughter)"). Trusted as fired — a provider that emits the tag already decided it.
  • acoustic_events — structured, scored acoustic events: label, optional score ([0,1]), optional start_s / end_s. Transcript-independent — ASR never sees these.
Your STT provider may already emit acoustic event tags; pass them through on audio_events or acoustic_events and the acoustic gate consumes them.

Event order

Events arrive in a locked sequence — the verdict fires as soon as the transcript rails resolve, before the audio detectors run:
Treat any unrecognized event type as opaque and keep reading to done.

Acoustic guardrails

The acoustic layer judges the audio directly — no ASR, no transcript — so it catches signal a transcript can’t: a scream, an alarm, breaking glass. The default detector is a deterministic event gate: it reads the acoustic_events / audio_events on the turn and escalates a clear alarming non-speech event to an enforcing route_to_human — a “get a human on this call now” signal, never a content block.
An acoustic finding uses the same shape as any other finding: domain is acoustic, sub_domain is audio_event, and metadata carries the matched event, its score, and timing. The gate escalates on clear events (scream, gunshot, alarm, glass-break, sustained crying) above its score threshold; a scoreless provider tag is trusted as fired. Unknown or low-confidence labels produce nothing — the gate never fires on a signal it can’t stand behind. Because acoustic findings are enforcing, the gate fuses with the transcript verdict most-restrictive-wins: a scream in the audio raises a benign transcript to route_to_human via verdict_revised, and a transcript block stands regardless of the audio.
Acoustic findings are not subject to the ASR-confidence downgrade below — they never depended on a transcript.

ASR-confidence downgrade

The judge never hard-blocks on a transcript it can’t stand behind. When an enforcing transcript rail would exclude / block but the transcript is untrustworthy, the verdict downgrades to route_to_human — a mis-transcribed word becomes a human review, never a silent block. A transcript is untrustworthy when either:
  • asr_confidence is present and below the floor (low_confidence), or
  • source is passthrough with no verifiable confidence (unverified_transcript).
transcript_ready.asr_confidence_verifiable tells you which case you’re in before any rail is enforcing. A measured asr_confidence is always honored on its number regardless of provenance.
Transcript findings (pii, safety) report as audit_only on this endpoint today: they appear in the stream but don’t gate the verdict. Acoustic findings enforce. Read done.envelope.findings for the full per-domain record.