BatchConfig schema and return the same set of outputs — the difference is protocol and response shape.
Configuration
Both endpoints use the sameBatchConfig 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 usedefault_conversation_type as the fallback.
Participant roles
Roles describe the speakers Velma expects. Scope roles to specific conversation types viaapplies_to_conversation_type_uuids. If omitted, the role applies to all types.
Behaviors
Thebehaviors 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.
Transcription options
Control what transcription data appears in clip outputs:Aggregate outputs
Set any of these to
false to suppress the corresponding output.
Batch endpoint
POST /api/velma-2-batch — submit a complete audio file, receive a single JSON response.
Request — multipart/form-data:
BatchResponse:
Error responses:
Streaming events
Velma emits JSON events throughout a streaming session. Every event has atype 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.
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 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.
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.
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.
done
Signals streaming is complete. Always the final event.
error
Emitted if a processing error occurs. The connection closes after this event.
WebSocket close codes
Related
- Behaviors — define what Velma listens for
- Audio formats — supported formats and raw PCM parameters
- Authentication — API key setup