Skip to content

P4B: Live call quality — latency and memory leaks #331

Closed

Description

@joelteply

Memory not freed after live chat, STT/LLM/TTS latency, simultaneous speech. See P4B.

Activity

  1. joelteply commented on Mar 26, 2026

    @joelteply
    ContributorAuthor

    Avatar camera geometry bug in live view:

    Most avatars show the BACK of their heads — camera is behind them. Some face correctly (Grok, Together, Gemini, Helper AI, Claude), others are 180° rotated (Groq Lightning, Local Assistant, Teacher AI, Fireworks AI, GPT, DeepSeek).

    Likely cause: inconsistent VRM model facing direction. Some models export facing +Z, others -Z. The per-slot camera setup doesn't compensate.

    Fix options:

    1. Detect model facing direction at load time and flip camera for reversed models
    2. Rotate the avatar model to face the camera consistently
    3. Store facing direction in the avatar catalog and apply per-model correction

    Screenshot captured in docs/images/bug.png

  2. joelteply commented on Mar 26, 2026

    @joelteply
    ContributorAuthor

    CORRECTION: Not camera geometry — vertex/mesh destruction.

    The avatars aren't backwards. The vertices are EXPLODED. Hair stretched into spikes, faces shredded, geometry destroyed. Compare:

    • Working: Grok, Together Assistant, Gemini, Helper AI, Claude Assistant — clean geometry
    • Broken: Groq Lightning, Local Assistant, Teacher AI, Fireworks AI, GPT, DeepSeek — mesh torn apart

    Likely causes:

    1. VRM joint limit: Bevy 0.18 can't handle >128 joints. Models with more joints get garbled skinning.
    2. Bone index overflow: Vertex bone indices reference bones that don't exist → vertices fly to origin or infinity
    3. VRM version mismatch: Working models may be VRM 0.x, broken ones VRM 1.0 with different bone structure
    4. 100Avatars vs VRoid: The working ones are the 8 VRoid CC0 models we kept. The broken ones might be 100Avatars models that weren't cleaned up, or the avatar assignment is wrong.

    This is a rendering bug, not a camera bug. The Bevy skinned mesh pipeline is corrupting vertex positions for certain models.

  3. joelteply commented on Mar 30, 2026

    @joelteply
    ContributorAuthor

    Superseded: Memory leak tracked in #603 (4GB guard added). STT latency fixed (#599-601). Simultaneous speech handled by LiveKit active speaker detection.

  4. added 3 commits that reference this issue on Aug 16, 2026
    1a81315
    b7ccc80
    50ed63d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions