Skip to main content

Character Components

Per-character conversation, voice input, and TTS playback.


UEstuaryCharacterComponent

UActorComponent — the per-character conversation interface. Created automatically on AEstuaryCharacter. This is the component you use most.

Methods

FunctionReturnsDescription
SendText(const FString& Text)FStringSend a user message. Returns the generated message_id.
SayLine(const FString& Text, bool bTextOnly = false)voidSpeak a scripted line via TTS (skips the LLM, auto-interrupts).
Interrupt()voidAbort the currently-streaming response. No-op if no active turn.
UpdatePreferences(const FEstuaryPreferences& Prefs)voidUpdate session-level behavior flags.
SetEnableAnimation(bool bEnable)voidOpt into ARKit-52 lipsync. Call before Connect.
SetEnableBodyAnimation(bool bEnable)voidOpt into body animation (experimental). Call before Connect.
IsRegistered() constboolTrue when registered with the subsystem and routing is active.
GetCurrentMessageId() constFStringmessage_id of the most recent turn.
GetCharacterId() constFStringCharacter ID inherited from the owning actor.
GetLiveLinkSubjectName() constFNameResolved Live Link subject for lipsync.

Properties

PropertyTypeDescription
LiveLinkSubjectOverrideFNameOverride the Live Link subject name. None = use Character ID.

Events (BlueprintAssignable)

DelegatePayloadFires when
OnBotResponseFEstuaryBotResponseEach streaming text chunk (bIsFinal on the last).
OnBotVoiceFEstuaryBotVoiceEach streaming TTS audio chunk.
OnSttResponseFEstuarySttResponseEach partial/final transcription during voice input.
OnInterruptAckedFEstuaryInterruptPayloadThe server confirms an interrupt.
OnBotAnimationFEstuaryBotAnimationA renderable ARKit-52 lipsync frame.
OnBotPoseFEstuaryBotPoseA renderable body-pose frame (experimental).
OnVisionResponseFEstuaryVisionResponseA vision (VLM) result for a sent camera frame.
OnCameraCaptureRequestedFEstuaryCameraCaptureThe server requests an image capture.
CharacterComponent->OnBotResponse.AddDynamic(this, &AMyActor::HandleResponse);
FString Id = CharacterComponent->SendText(TEXT("Hello!"));

UEstuaryAudioPlayerComponent

UAudioComponent — decodes and plays streaming TTS audio (bot_voice) with a short pre-buffer for pop-free playback. Add it to the character actor; it auto-wires to the conversation stream on BeginPlay.

Methods

FunctionReturnsDescription
EnqueueBotVoice(const FEstuaryBotVoice& Voice)voidQueue a TTS chunk (called automatically).
EnqueueRawPcm16(const TArray<uint8>& PcmBytes, int32 RemoteSampleRate)voidQueue raw PCM16 audio you produced.
FlushAllForMessage(const FString& MessageId)voidDrop queued audio for a message (used on interrupt).
SetEnableAnimation(bool bEnable)voidEnable the amplitude envelope tap used by lipsync.
GetCurrentAudioTime() constfloatSeconds elapsed in the current utterance.
GetPlaybackTimeSeconds() constfloatTotal playback time.
IsBotAudioActive() constboolTrue while TTS is playing.
GetCurrentJawWeight() constfloatCurrent amplitude-driven jaw weight (lipsync fallback).

UEstuaryMicrophoneComponent

UActorComponent — captures the player's microphone and streams it for transcription. Cross-platform (Win64 / Mac / iOS / Android). Created automatically on AEstuaryCharacter.

Microphone capture is fixed at 16 kHz mono for transcription.

Methods

FunctionDescription
StartListening()Begin the voice session and stream microphone audio.
StopListening()End the session and trigger final transcription.
SetMuted(bool bMuted)User mute. Never toggled automatically.
SetSuppressed(bool bSuppressed)Half-duplex guard — stop sending while the bot speaks (WebSocket voice).
SetAutoBargeIn(bool bEnable)Enable/disable auto-interrupt when the user speaks. Default on.

Properties (read-only)

PropertyTypeDescription
bIsCapturingboolTrue between StartListening and StopListening.
bIsMutedboolCurrent user-mute state.
bIsSuppressedboolCurrent half-duplex suppression state.
bAutoBargeInboolWhether auto barge-in is enabled.
// Push-to-talk
void AMyPawn::OnTalkPressed() { MicrophoneComponent->StartListening(); }
void AMyPawn::OnTalkReleased() { MicrophoneComponent->StopListening(); }

See Voice Connection for the full voice workflow.