Skip to content

feat(ui): add streaming voice chat with LFM3 and SoulX avatar - #1176

Merged
0xShug0 merged 4 commits into
mainfrom
feature/voice-chat-avatar-app
Nov 2, 2026
Merged

0xShug0 merged 4 commits into
mainfrom
feature/voice-chat-avatar-app

Conversation

@0xShug0

@0xShug0 0xShug0 commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Adds a Voice chat app that combines selectable ASR, LFM3-Audio conversation and built-in voices, and SoulX-FlashHead portrait animation. Reply text, selected-voice audio and animation stream through the pipeline without waiting for the complete reply.

The app includes portrait crop preview, voice selection, optional personality prompts, multi-turn conversation history, synchronized playback, replay audio and cancellation. ASR provides the displayed user transcript; LFM3 receives the original recording. Native S2S reply artifacts preserve conversation history, while a separate TTS session supplies the selected voice.

LFM3 conversational voice chat currently supports English only; its multilingual ASR and TTS capabilities do not imply multilingual conversation support. Personality text is forwarded as the conversation system prompt, and changing it starts a new conversation context.

Implementation

  • Add generic streaming execution to CLI/server recipes using existing streaming sessions and live PCM input. Pipeline orchestration stays in the recipe, rather than the server runtime.
  • Add voice-chat-avatar to queue incoming text phrases for TTS and feed audio continuously into the avatar. Bounded text/PCM queues provide backpressure and propagate errors and cancellation. speaking-avatar also supports fixed text through the same TTS/avatar pipeline.
  • Add a stateful libsoxr resampler that preserves filter state across audio chunks. Existing one-shot resampling is unchanged.
  • Reuse shared browser PCM/video helpers and regenerate the WebUI bundle. No model implementation, GGML kernel or model spec changes.

The example server configuration registers four sessions and explicitly selects SoulX's cuDNN VAE implementation. It requires a cuDNN-enabled build; the documentation explains how to select ggml instead. Different TTS/avatar sample rates require libsoxr.

Validation

  • Debug server build and WebUI build pass; Svelte checks report zero errors or warnings.
  • Recipe tests cover overlapping conversation/TTS/avatar execution, phrase preservation including UTF-8, producer/consumer failures and continuous resampling against one-shot output. The conversation fixture cannot finish until animation starts.
  • Browser checks pass for configured and managed models, including voice selection, history/session reuse, failure recovery, microphone input and cancellation. Playback is explicitly checked while reply text is still incomplete.
  • A real two-round CUDA conversation with cuDNN starts playback 1.19 s and 1.02 s after sending. At playback start, reply text contains 197/235 and 175/364 final characters respectively, confirming overlap with ongoing text generation. Generation RTF is 0.433 and 0.451 for 16.96 s and 23.20 s replies.
  • A fresh two-round browser recording was exported to H.264/AAC and checked for decoding errors.

@0xShug0
0xShug0 merged commit 8a77355 into main Nov 2, 2026
12 checks passed
@0xShug0
0xShug0 deleted the feature/voice-chat-avatar-app branch November 2, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant