AlphaAvatarDocs

Docs version

Docs version

On this page

v0.7.0English
  1. ⚙️ Runtime and processors
  2. 🎙️ Audio and transcription
  3. 🎯 Addressing and conversation focus
  4. 🔀 Turn decisions and Engine admission
  5. ⚡ Full-duplex interaction
  6. 🔊 Native output
  7. ⚙️ Configuration ownership
  8. 🔌 Boundaries
  9. 📦 Installation
v0.7.0

Reference / Plugin reference / Perception

v0.7.0 · source 21190a84 · English

🎯 AlphaAvatar Interaction Router Plugin

Router coordinates realtime perception, addressing, turn-taking, synthesis and transcript synchronization through independent processors. It borrows model/voice abstractions and does not publish directly to LiveKit or a frontend.

⚙️ Runtime and processors

InteractionRouterRuntime implements on_start() / on_stop() and delegates ordered processor lifecycle to Core LifecycleGroup through a local adapter. RouterProcessorBase retains its name, start() and stop() interface.

The factory orders consumers according to their dependencies. A processor is an independently owned lifecycle component, not a new task-specific runtime. Startup rollback/closure also covers partial initialization; shutdown failures propagate after ordinary peer cleanup rather than only being logged.

ProcessorMain inputOutput
AudioActivityProcessorPerception audioSpeech frames and segments with VAD state and pre-roll.
SpeechTranscriptionProcessorRouted speechTranscript observations with segment provenance.
SemanticAddressingProcessorTranscripts and conversation focusTyped semantic addressing evidence.
VisualAddressingProcessorFace annotationsFace-orientation addressing evidence.
TurnTakingProcessorSpeech, transcripts and addressing evidenceTurn decisions.
SpeechSynthesisProcessorAUDIO_SYNCED source textAudioFrame and text/audio alignment.
TranscriptSynchronizationProcessorSource text, alignment, playback and controlPlayback-derived transcript chunks.

🎙️ Audio and transcription

Plain text
RTC -> PerceptionRuntime.audio -> AudioActivityProcessor
    -> SPEECH_FRAME / SPEECH_SEGMENT -> SpeechTranscriptionProcessor
    -> TRANSCRIPT_SEGMENT

Each source owns independent VAD/segmentation state. Pre-roll and bounded queues keep ingestion separate from transcription and model latency. Voice factories come from runtime.foundation.voice (VoiceBundle); Router owns borrowed streams/requests, not the factory lifecycle.

🎯 Addressing and conversation focus

Semantic Addressing uses configured Avatar aliases and the temporal transcript window since the last committed Turn (every speaker's segments in media order, with a bounded history of committed Turns) to label each transcript POSITIVE (directed at the Avatar), NEGATIVE (not directed at it) or UNKNOWN. Each result annotates its own transcript and cites the context it read; only a committed TurnSnapshot retires the input it owns. UNKNOWN is abstention, not evidence of another addressee.

Explicit POSITIVE/NEGATIVE evidence updates the conversation focus; UNKNOWN preserves it. Audio-only interaction can start with an Avatar-directed conversational prior, which explicit non-Avatar evidence overrides. Model implementation stays behind the SemanticAddressingModelBase contract.

VisualAddressingProcessor consumes FACE_DETECTION annotations, smooths orientation scores and publishes subject-scoped evidence. Ambiguous multi-face observations are skipped when the subject cannot be resolved. Face orientation is a heuristic, not a measurement of eye gaze. Gaze, gesture and other future evidence producers can use the same annotation contract.

Addressing fusion preserves provenance, detects conflicting targets and prioritizes explicit current evidence over focus fallback. Provider-specific thresholds stay with the owning model/processor.

🔀 Turn decisions and Engine admission

TurnTakingProcessor coordinates one open temporal input window and the sealed inputs awaiting STT or admission, transcript/addressing readiness, asynchronous assessments, stale-result rejection and bounded evidence waits. A segment's speaker label adds to the input's input_devices, never sets its boundary. It publishes COMMIT, HOLD, PASSIVE, INTERRUPT or CANCEL decisions according to its policy.

Plain text
Speech + transcripts + addressing
    -> TurnTakingCoordinator / policy
    -> perception turn-decision annotation
    -> AvatarEngine
    -> committed Turn and Loop submission / precise interruption

Engine now owns admission and native execution scheduling. There is no separate TurnController or SDK response sink. The Router's decision is not itself a model request or a persistence acknowledgement.

AUDIO_ONLY and AUDIO_VISUAL combine the available evidence. VISUAL_ONLY remains an extension point for proactive behavior; its enum or an enabled visual consumer does not imply that proactive visual turns are fully implemented.

⚡ Full-duplex interaction

Input, transcription, addressing, model execution, synthesis and playback progress independently. Speech-start interruption need not wait for a final transcript or semantic assessment. After interruption, STT and addressing can continue to determine whether a new committed answer is appropriate.

An old decision cannot gain authority over a newer execution merely by using the same lane. Runtime fixes interruption targets at acceptance; consumers use those exact output/lane/scope identities.

🔊 Native output

ASSISTANT and TRANSIENT use the same native output contracts:

Plain text
EnvOutput(TEXT_CHUNK, AUDIO_SYNCED)
    -> OutputRuntime.publish(...)
    -> SpeechSynthesisProcessor
    -> EnvOutput(AudioFrame / alignment)
    -> RTC audio adapter
    -> playback feedback
    -> TranscriptSynchronizationProcessor
    -> RTC transcript adapter

Consumers read event.output. Formal scope, model/item provenance, content phase and completion barriers are typed fields rather than execution-significant metadata keys.

One logical output owns its synthesis job. Source chunks are kept in order; replacement or interruption cannot reopen a retired output. Output text preserves whitespace and code indentation. Media publication reuses validated Core audio frames; runtime publication does not re-encode PCM.

TEXT_COMPLETE seals text, AUDIO_COMPLETE seals audio/alignment production, COMPLETE is the Runtime output terminal state, and PLAYBACK is transport delivery evidence. Synthesis, playback and transcript finalization are not collapsed into one generic completion broadcast.

The synchronizer releases text according to played audio. Already delivered transcript remains after interruption; unplayed source text is not reported as heard. Fallback alignment estimates timing from synthesized duration; native provider alignment can improve precision without changing RTC's contract.

IMMEDIATE text does not wait for audio. MIRROR remains observational text for a separately owned delivery path, not a duplicate visible answer. Consumers for unsupported AUDIO_SYNCED output remain present so missing TTS produces an explicit terminal outcome rather than leaving an active output forever.

⚙️ Configuration ownership

Plain text
router.init_config.audio_activity       -> AudioActivityConfig
router.init_config.addressing.semantic  -> SemanticAddressingConfig
router.init_config.addressing.visual    -> VisualAddressingConfig
router.init_config.turn_taking          -> TurnTakingConfig

Addressing owns observation/model settings. Turn Taking owns evidence fusion, coordination, interruption and deadlines. addressing_wait_sec, transcript_wait_sec, transcript_timeout_sec, unsegmented_alignment_sec, speech_completion_wait_sec, commit_timeout_sec, max_pending_inputs, max_window_segments and fusion belong directly to turn_taking, not its policy subtree. transcript_wait_sec only reports a pending transcript; transcript_timeout_sec is the hard deadline that retires it. The schema's transcript_wait_sec is 0.75 s; demo.yaml and the profiles config init and Setup write set it to 3.0 s, equal to the deadline, so no pending transcript is reported before the deadline.

interruption.enabled controls supported Turn interruption; interruption.audio_only_speech_start additionally selects immediate audio-only speech-start interruption. There is no parallel voice.allow_interruptions switch.

See Examples for full configurations. Disabled optional processors are not constructed; output consumers still honor their explicit unsupported-output handling. Runner selection and model initialization remain separate from processor startup.

🔌 Boundaries

Core owns data, timing, state-transition and lifecycle contracts. Router owns interaction processors. Voice owns factories. Persona owns identity processing. Engine owns admission and execution; Host owns assembly; RTC owns codecs, room/track resources and delivery projection.

Router does not own database persistence, transport-specific types, Provider client implementations or another generic event bus. It does not directly consume canonical records as a replacement for Memory/Context consumers.

📦 Installation

alphaavatar setup installs it when the bundle selects it, with the extras the selected implementations need; from source, uv sync --all-packages --locked installs it with the whole workspace (installation). AlphaAvatar's packages are not published to PyPI.

The plugin is selected through Agent configuration. The semantic and turn-taking extras install the local Semantic Addressing and Smart Turn runtimes the default configuration selects.


Content maintained in AlphaAvatar/AlphaAvatar · source version shown above.


Documentation

v0.7.0English

Up / Down to navigate · Enter to open · Esc to close