-
Notifications
You must be signed in to change notification settings - Fork 0
Background Rendering and Cache Reuse
Anubha Parashar edited this page Jun 15, 2026
·
1 revision
Voice generation and lip-sync rendering are slow because they are deep-learning workloads. ASHU Mentor AI Studio avoids freezing the UI by running long jobs in the background and by reusing previously generated media.
| Step | Reason |
|---|---|
| XTTS voice generation | Voice cloning is model inference; CPU runs are slower |
| SadTalker video generation | Generates talking-head frames and merges audio/video |
| Browser-safe conversion | Re-encodes MP4 to H.264/AAC for Streamlit/Chrome playback |
stateDiagram-v2
[*] --> Idle
Idle --> PrefetchCheck: Start full background pipeline
PrefetchCheck --> CachedReady: Cached audio/video found
PrefetchCheck --> VoiceRunning: No cache / force regenerate
VoiceRunning --> VoiceReady: tts_audio.wav generated
VoiceReady --> RenderRunning: start SadTalker/Wav2Lip
RenderRunning --> BrowserSafeConvert: MP4 completed
BrowserSafeConvert --> FinalReady: browser-safe MP4 ready
CachedReady --> FinalReady
FinalReady --> [*]
| Control | Purpose |
|---|---|
| Prefetch latest generated audio/video | Loads last generated media for current segment |
| Force regenerate instead of using cached output | Ignores cache and creates new audio/video |
| Start full background pipeline | Starts audio + video generation without freezing app |
| Refresh pipeline status | Updates progress and detects completed outputs |
Each generated segment creates a folder like:
lipsync_renders/training_segment_1_REST_API_security_and_JWT_authentication_<timestamp>/
Common files:
tts_audio.wav
tts_audio.script.txt
manifest.json
voice_generation_run.log
renderer_run.log
talking_presenter_output.mp4
talking_presenter_output_browser.mp4
- Generate once using full background pipeline.
- Use
Prefetch latest generated audio/videofor later demos. - Tick
Force regenerateonly when script, presenter, or voice sample changes.
ASHU Mentor AI Studio · Adaptive Smart Human-like Unit Mentor AI Studio
Home · Demo & Live App · Architecture · Features · Security & Consent
Maintained by @dranubhaparashar