Overview
You can update a persona’s language, voice generation settings, and voice detection settings during a live session — no reconnect required. Updates are sent over the data channel usingsendDataMessage().
Updates are best-effort. Where possible they take effect immediately; in some
cases they are applied at the start of the next user turn.
Method Signature
Basic Usage
Send apersona_config message containing only the fields you want to change:
languageCode, voiceGenerationOptions, and voiceDetectionOptions inside data. Only the fields you send are changed — everything else keeps its current value.
What you can update
Language
SetlanguageCode to an ISO 639-1 code:
Voice generation
Adjust speed, volume, emotion, and provider-specific settings. The available fields and their valid ranges depend on your voice provider and model — see Voice Configuration for the full list.Voice detection
Adjust turn-taking and silence handling. See Voice Detection for all options and ranges.Validation
Updates are validated before they are applied:- At least one field must be present — an empty
data: {}is ignored. - Unknown field names are rejected.
- Values must be within the valid range for your provider and model.
- Sending a voice generation field your provider or model doesn’t support is rejected.
SERVER_WARNING event:
Prerequisites
Before sending an update, you must:- Have an active streaming session (call
stream()orstreamToVideoElement()first). - Have successfully connected to the Anam Engine.
Next Steps
Voice Configuration
See every voice generation option and its valid range per provider
Voice Detection
See every turn-taking and silence option
Event Types
Listen for
SERVER_WARNING and other session eventsUser Messages
Send messages and context programmatically

