Voice agents
Feed speaker-attributed voice measurements into an agent runtime
ProsodyAI streams committed speaker lanes, transcript deltas, physical voice measurements, and speaker-relative change. Your agent runtime decides how those facts affect an LLM or speech synthesizer.
import { VoiceFrame } from '@prosodyai/sdk';
const stream = prosody.stream.connect({
onDirective(event) {
const frame = VoiceFrame.fromDirective(event);
agentContext.update({
speaker: frame.speakerId,
pitch: frame.state.intonation.pitch,
loudness: frame.state.stress.loudness,
change: frame.change,
vad: frame.vad,
});
},
});The WebSocket audio clock advances continuously. Speaker attribution and speaker-relative state come from the model's recurrent lanes. Product events carry measurements and committed identity facts.
Agent policy
Build response policy in your application from the measurements your use case
needs. For example, compare change.stress.loudness or
change.intonation.pitch with the same speaker's prior state, then record the
policy decision in your own agent trace.
Event inputs
| Field | Type | Description |
|---|---|---|
speaker_id | string | Committed conversation-local lane |
acoustic_state | object | Current physical measurements and masks |
acoustic_change | object | Change against that speaker's recurrent reference |
timestamp_ms | number | Position on the session audio clock |
Speech synthesis remains with your selected provider.