Skip to content

Feature/gradio UI , Added Gradio Web UI with Dual-Speaker Support, Examples, and Stability Fixes - #23

Open
NemesisGuy wants to merge 2 commits into
Soul-AILab:mainfrom
NemesisGuy:feature/gradio-ui
Open

Feature/gradio UI , Added Gradio Web UI with Dual-Speaker Support, Examples, and Stability Fixes#23
NemesisGuy wants to merge 2 commits into
Soul-AILab:mainfrom
NemesisGuy:feature/gradio-ui

Conversation

@NemesisGuy

@NemesisGuy NemesisGuy commented Nov 4, 2025

Copy link
Copy Markdown

Add Gradio Web UI with Dual-Speaker Support, Examples, and Stability Fixes

This PR introduces an interactive Gradio web UI for SoulX-Podcast and includes several supporting improvements for a smoother local inference experience and dual-speaker podcast generation.

Key changes

Gradio UI

  • gradio_app.py: Main Gradio app supporting Single and Dual Speaker modes.
  • webui.py: Optional helper for WebUI/demo purposes.
  • Supports both bracketed tags ([S1] / [S2]) and prefix tags (S1: / S2:).
  • Silent-audio fallback if reference audio is missing.
  • Sample token resolution via JSON tokens (sample1 / sample2).

Examples & Smoke Tests

  • Updated README.md with usage instructions and sample JSONs.
  • example/gradio/smoke_test.py: Lightweight input validation and optional full inference test.
  • Added example dialog JSONs and sample audio under example/.

Engine & Infrastructure

  • llm_engine.py: Clean, merged HF/vLLM wrapper. Optional vLLM imports are guarded; HF is the default.
  • In-process model caching and safe fallback to avoid duplicate GPU allocations.

Docs & Metadata

  • CHANGELOG.md updated with unreleased feature section.
  • README.md now documents the Gradio UI and Dual Speaker workflow.

Merge / Housekeeping

  • Resolved rebase conflicts, consolidated .gitignore and README.md.
  • Ensured all Python modules compile.

Why this change

  • Improves developer experience with a local browser UI for experimentation.
  • Adds robust dual-speaker handling (tokenized sample references, dialect prompts, upload precedence rules).
  • Introduces a small smoke-test harness to validate inputs quickly.

Testing performed

  • Syntax checks via python -m py_compile for edited modules.
  • Completed rebase and resolved merge conflicts.
  • Local testing of Gradio app and smoke test recommended.

Manual testing completed:

  • Smoke test passed
  • Gradio UI started successfully and model loaded

Usage notes

  • Run light smoke test (no model load):
    python example/gradio/smoke_test.py
  • Run full smoke test (loads model):
    python example/gradio/smoke_test.py --run --model-path pretrained_models/SoulX-Podcast-1.7B
  • Start UI:
    python gradio_app.py
    Open http://localhost:7860
  • vLLM is optional; HF engine is used if vLLM is not installed.
  • Consider a quick README tidy-up before publishing to remove duplicate sections from merge resolution.

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