How kedreamix/linly-talker works
Project type and purpose
• Linly-Talker is a full-stack, modular digital human dialogue system.
• It provides a Gradio-based WebUI frontend and FastAPI-style invocation for orchestrating:
• ASR (speech-to-text)
• LLM (dialogue)
• TTS (text-to-speech & voice-cloning)
• THG (talk-head generation: lip-sync, avatar animation, NeRF)
• Users supply images, voice or text; the system responds with synchronized speech and animated digital humans.
File structure
• Top-level orchestrator scripts:
• webui.py – unified Gradio UI hosting all modules
• app*.py – legacy or specialized entrypoints (app_img.py, app_talk.py, app_musetalk.py…)
• api/ – wrappers for exposing module functionality over FastAPI
• ASR/, TTS/, VITS/ (voice clone), GPT_SoVITS/, CosyVoice/ – each implements a speech module
• LLM/ – adapters for multiple large‐language models (ChatGPT, Qwen, Gemini, etc.)
• TFG/ (THG) and MuseTalk/ – deep models for head generation (SadTalker, Wav2Lip, ER-NeRF, MuseTalk)
• configs.py – central configuration (ports, model paths, SSL certs)
• checkpoints/, GPT_SoVITS/pretrained_models/, MuseTalk/models/, Qwen/, Whisper/, FunASR/ – pre-downloaded weights
• scripts/ – installation/download helpers
• src/ – lower-level research code (face3d, facerender, audio2pose, etc.) supporting THG pipeline
README for insights
• The README describes a multimodal pipeline (HOI_en.png):
User → ASR → LLM → TTS → THG → Output
• It lists supported submodules and how to configure them
• WebUI / API Layer
• Core Orchestrator
• ASR Module
• LLM Module
• TTS Module (edge, paddle, CosyVoice, GPT-SoVITS etc.)
• Voice-Clone Module (GPT-SoVITS, XTTS, CosyVoice)
• THG Module (SadTalker, Wav2Lip, Wav2Lipv2, ER-NeRF, MuseTalk)
• Models Storage (checkpoints/, pretrained_models/)
• External Services (openai.com, HuggingFace, Edge TTS service, ModelScope)
1. User → WebUI (image, microphone, text input)
2. WebUI → Orchestrator (via function calls or FastAPI endpoints)
3. Orchestrator → ASR Module → transcribed text
4. Orchestrator + context → LLM Module → response text
5. Response text → TTS Module → speech audio
6. Optionally: speech + image → Voice-Clone Module → cloned voice
7. Image + audio → THG Module → talking avatar video
8. Media back to WebUI for display/playback
9. Any module may read weights from Models Storage
10. Some modules call external APIs (LLM, Edge TTS)
c. Architectural patterns / principles:
• Modular plugin architecture: each capability is a self-contained Python package
• “Orchestrator” implements a pipeline pattern
• Separation of concerns: UI, API, orchestration, and individual AI modules are decoupled
• Config-driven: configs.py and YAML/JSON under configs/ govern model selection & hyperparameters
d. Technologies & frameworks:
• Gradio (frontend)
• FastAPI (optional API layer)
• PyTorch, ONNX (models)
• HuggingFace Transformers, ModelScope
• CosyVoice, PaddleSpeech, edge-tts libraries
• OpenAI Whisper, Alibaba FunASR
• RVC-Based GPT-SoVITS, Coqui XTTS
• SadTalker, Wav2Lip, ER-NeRF, MuseTalk for video generation
• Docker / conda for environment, scripts/install.sh