Skip to main content
Velma Triage offers two endpoints with the same analysis capabilities. Both accept the same BatchConfig schema and return the same set of outputs, with one streaming-only addition (the per-speaker deepfake summary). The difference is protocol and response shape.

Configuration

Both endpoints use the same BatchConfig schema. You can send the literal string "default" instead of a full config to use Velma’s built-in default behavior set without specifying anything.

Conversation types

A conversation type tells Velma what kind of interaction it is analyzing. Velma uses this to contextualize behavior detection and role assignment. You can define multiple types — Velma will infer which one best matches, or use default_conversation_type as the fallback.

Participant roles

Roles describe the speakers Velma expects. Scope roles to specific conversation types via applies_to_conversation_type_uuids. If omitted, the role applies to all types.

Behaviors

The behaviors array accepts two types of entries — full BehaviorDef objects and preset reference strings — and you can mix both in the same array. Preset reference: a string in the form "preset:<identifier>". Velma expands it into the full behavior definition before processing. Use GET /api/velma-2-batch/list-presets or GET /api/velma-2-streaming/list-presets to discover available identifiers. Full BehaviorDef: supply all four required fields yourself. Takes precedence over any preset entry with the same UUID.
See Behaviors for the full guide.

Transcription options

Control what transcription data appears in clip outputs:

Aggregate outputs

Set any of these to false to suppress the corresponding output. produce_deepfake_summary is the exception: it defaults to off, and is set true to turn the output on.

Deepfake summary interval

deepfake_summary_interval_seconds controls how often a deepfake_summary is produced: per-speaker clip counts and talk time by context verdict, plus an overall assessment. Rejected as invalid configuration if set to anything else, or to a non-zero value while produce_deepfake_summary is false.

Conversation dynamics and assessments


Batch endpoint

POST /api/velma-2-batch — submit a complete audio file, receive a single JSON response. Request — multipart/form-data:
Response — BatchResponse: Error responses:

Streaming events

Velma emits JSON events throughout a streaming session. Every event has a type field.

clip

A transcribed segment of speech. Emitted in near real time.
emotion, accent, and deepfake_score are non-null only when their corresponding Transcription options are enabled. deepfake carries a standalone reading (from this clip’s own deepfake_score alone) and a context reading (informed by the speaker’s earlier clips, with a changed flag set when the verdict flips from that speaker’s previous clip); it is computed once, from a reading of this clip’s own audio, and is null whenever this clip never had one of its own, even if deepfake_score shows a carried-forward value from elsewhere in the stream.

partial_clip

An in-progress clip streamed while an utterance is still being spoken. Multiple partials may arrive for the same clip_uuid as the utterance grows; the eventual clip event reuses that clip_uuid and supersedes all of its partials.

clip_update

Refined emotion, accent, and deepfake_score values for a previously finalized clip; clip_uuid matches an earlier clip event. A clip may receive any number of updates (including none), always before the done event — for each field present, the latest received value wins.
The deepfake_score on an update is the score for the whole clip. The value on the clip event and on each partial_clip is an in-progress estimate, and until the clip has a reading of its own it repeats the most recent reading from earlier in the stream, which may be another speaker’s. deepfake is not recomputed on a clip_update; it reflects only the reading already reported on the clip event.

conversation_type

Velma’s pick for the conversation type, emitted once enough context is available.
selection_source is one of inferred, auto_selected_single_option, or default.

participant_role

A per-speaker role assignment. One event per speaker label.

behavior_detection

A per-behavior verdict. Emitted for each behavior once Velma has enough audio to decide. A behavior is detected at most once per speaker unless its trigger_limit allows more. See Detecting a behavior more than once.
In a batch response, each entry in behaviors also carries occurrence_index, occurrence_count, truncated, and the behavior’s trigger_limit. A behavior detected more than once for a speaker appears as one entry per occurrence. See Detecting a behavior more than once.

topics

Aggregated list of subjects discussed. May be emitted more than once as the conversation progresses; each event fully replaces the previous list, so always treat the latest as authoritative.

topic_sentiment

Per-speaker sentiment for each topic. May be emitted more than once as the conversation progresses; a later event supersedes an earlier one for the same topic and speaker.
sentiment_score ranges from −1 (strongly negative) to +1 (strongly positive).

summary

A free-form narrative summary. May be emitted more than once as the conversation progresses; each event fully replaces the previous summary.

conversation_dynamics

The speaker entries and the conversation-level block over the transcript so far. Emitted after each finalized clip and once more before done; each event fully replaces the previous one. Only emitted when conversation_dynamics is true.
evaluated marks the speaker the role picks identify as the party under evaluation. Role picks arrive over the stream, so that flag can change between events. Timing comes from transcript clip boundaries, not acoustic measurement.

interruption, false_start, repeat

One located event each, emitted the first time it is found and never again. Later conversation_dynamics events keep listing it. Only emitted when conversation_dynamics is true.
An interruption’s evidence is overlap, cue, cut_off, resume, or tight_handoff; yield_ms and overlap_ms are measured for overlap only. A false start’s evidence is cut_off or restart. See the streaming reference for how each is detected.

assessment

One judged outcome for one clip of the requesting speaker, for one enabled signal. Emitted when the pass that judged it completes, which can be well after the clip. Only emitted when the signal is true in assessments.
outcome depends on the signal: requests uses unanswered, answered, uncertain; corrections uses applied, ignored, asked_to_clarify, uncertain; interruption_recovery uses addressed, resumed, restarted, ignored_interruption, uncertain.

assessments

Coverage of every enabled assessment over the whole stream, emitted once before done. A signal is null when its flag was off or when no responding and requesting speaker could be identified. Its events lists repeat the assessment events already delivered.
Clips that were not assessed reduce turns_assessed and are not negatives. Empty events with incomplete coverage must not be interpreted as healthy.

deepfake_summary

Per-speaker deepfake assessment summary for the conversation so far. Emitted only when produce_deepfake_summary is true; see Deepfake summary interval for cadence.
as_of_ms is the end time in the audio of the latest finalized clip, scored or not: an unscored clip still advances it even though it is excluded from speakers. One entry appears in speakers per speaker with at least one scored clip; unscored clips are not counted. assessment.verdict is synthetic, non-synthetic, or mixed; it is mixed once a speaker has had both context verdicts, including a single flip that later reversed. assessment.confidence is the mean of context.confidence over that speaker’s counted clips.

done

Signals streaming is complete. Always the final event. Carries the total audio duration and the model version that produced the session’s analysis.

error

Emitted if a processing error occurs. The connection closes after this event.

WebSocket close codes