Spaces:
Paused
Paused
Commit History
-
shorten desc
7e94063 -
Merge pull request #13 from MomsVoiceAI/fix/readme-hf-trag
Unverified signatureadd preload_from_hub1d90982 -
add preload_from_hub
bab138a -
Merge pull request #12 from MomsVoiceAI/fix/readme-hf-trag
Unverified signatureupdate tag in readmedba2400 -
update tag in readme
e872728 -
add youtube link in readme
ed0a3fc -
fix README demo img
be0895c -
fix README syntax err
94d3077 -
update README link
0f9cd38 -
update README team members
1f4281f -
fix duplicated demo step
fc991f4 -
Merge pull request #11 from MomsVoiceAI/fix/README-spec
Unverified signatureupdate README demo7147e54 -
update README demo
04f7e9c -
Merge pull request #10 from MomsVoiceAI/fix/lfm-model-param
Unverified signatureperf: improve LFM2.5-Audio inference quality and reliability7257098 -
update report md
9e0a83b -
fix prompt for short answer
942f441 -
fix to ui to visible
fbb26dd -
Fix record button
f30d5ae -
perf: improve LFM2.5-Audio inference quality and reliability
Applies fixes from inference_lfm_fix.py based on demo testing: - Fix system prompt: use official "Respond with interleaved text and audio." instead of custom storyteller prompt; move story context to user turn so the model processes it correctly for interleaved speech-to-speech - Fix audio decode: switch from Mimi streaming decode to post-generation processor.decode(audio_codes) which is more stable and avoids Mimi streaming state corruption between calls - Remove torch.compile and _reset_mimi_streaming_state (caused silent audio / Mimi state bugs); replace with eager Mimi warmup on CUDA - Raise max_new_tokens 100 -> 512 across inference_lfm, qa_flow, app.py (100 was insufficient for complete audio generation at 12.5 Hz/frame) - Add get_model_status() for GPU memory diagnostics - Add text_to_audio_lfm() for LFM-based TTS mode - Add _assemble_waveform() helper shared by TTS and Q&A paths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4798cd4 -
Merge pull request #8 from MomsVoiceAI/fix/answer-audio
Unverified signaturefix: Answer audio - use Mimi streaming decoder + flash-attn3cfd932
-
perf: warmup generation, async LFM loading, reduce max_new_tokens
- Add warmup_lfm() that triggers torch.compile graphs on a dummy query - Load LFM model in background thread (app starts faster, Play works immediately) - Reduce default max_new_tokens from 200 to 100 (shorter answers for kids) - Add _reset_mimi_streaming_state() helper to flush decoder buffers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>871cd89 -
perf: add torch.compile for LFM model on HF Space (20-60% faster inference)
- Uses mode='reduce-overhead' with dynamic=True for variable-length generation - Only applies on Linux/CUDA (skipped on Windows where Triton is unavailable) - Gracefully falls back to eager mode if compilation fails - Removes warmup decode that could leave streaming artifacts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>52dd416 -
Merge pull request #9 from MomsVoiceAI/fix/sox-pkg
Unverified signaturefix: restore packages.txt with sox and ffmpeg dependencies for HF Spaces43cb842 -
fix: restore packages.txt with sox and ffmpeg dependencies for HF Spaces
85ab3de -
fix: proper Mimi decode on HF Space — only disable dynamo on Windows, explicit device handling
- Only set TORCHDYNAMO_DISABLE on Windows (HF Space has Triton) - Use torch.no_grad() matching official demo pattern - Warmup Mimi at load time to catch device errors early - Explicit mimi_device for code tensors - Log decode failures with device info for debugging - Force format=wav for mic input, restore autoplay=True Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>5bb5f05 -
fix: use Mimi streaming decoder for proper speech audio (not LFM detokenizer)
The LFM detokenizer produced garbled noise (35% speech-band energy). The official Mimi streaming decode produces real speech (98%+ speech-band). Also sets correct 24kHz sample rate and filters EOS tokens. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>d397f1a -
feat: restore story cover PNGs via Xet storage + migration docs
docs: update migration guide with successful git-xet solution docs: highlight problematic commits that caused PNG rejection issue test: verify HF accepts push (PNG rejection fixed)39ce399 -
remove packages.txt - ffmpeg already in base image
a8c11c1 -
fix: packages.txt use only ffmpeg
538d2b1 -
fix: remove invalid libsox-fmt-all package
16d3c03 -
fix: Play produces no sound — switch to streaming audio + system deps
Root cause: Audio component with streaming=False replaces audio on each yield, causing rapid restarts with no audible output on fast GPUs. Fixes: - Audio component: streaming=True (yields APPEND to playback buffer) - Ensure float32 dtype on all audio yields - Add packages.txt with sox/ffmpeg for Qwen TTS system deps - Add from __future__ import annotations for Python 3.9 compatibility - Copy bundled audio_cache to runtime dir on startup (HF bucket) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>373219a -
feat: upload pre-generated audio and copy to runtime cache on startup
- Generated all 17 paragraphs for Puss in Boots story - Upload hash-named files to audio_cache/ in Space repo - Upload story-based named files to pregen_audio/ for reference - Add startup logic to copy bundled audio_cache/ to runtime AUDIO_CACHE_DIR (handles HF Space where runtime cache is on /data bucket) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>e278ccc -
fix: Play produces no sound on HF Space
Root causes: - Stock voice profile was only created lazily on first Play, failing silently - synthesize_custom_voice_streaming returned empty when profile missing - Worker put empty arrays into queue, Gradio received zero-length audio Fixes: - Pre-create stock voice profile at startup (after model load) - Raise RuntimeError instead of silent return when profile unavailable - _ensure_stock_voice_profile raises FileNotFoundError if ref wav missing - Skip empty wav segments in audio stream generator - Guard against None wav in error path Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>44fbd0d -
fix: correct LFM audio sample rate to 48kHz and normalize volume
- SAMPLE_RATE 24000 -> 48000 (codec outputs 1920 samples/frame × 25 fps) - Always normalize to 0.9 peak (was only scaling down, causing quiet output) - Save answer WAV as PCM_16 for universal compatibility Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>60d60e5 -
refactor: consolidate to Base 1.7B only, remove CustomVoice
- Remove get_custom_voice_model() and _MODEL_MODE checks - Add profile_id_override param to create_voice_profile() - Update Profile page: 2 models, Base 1.7B as single TTS engine - Upload vivian_reference.wav to HF Space Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>af03300 -
fix: audio decode normalization + warmup first 5 paragraphs
- inference_lfm.py: normalize waveform to [-1,1], handle dtype/device issues, detect garbage audio (too quiet), proper float32 conversion - qa_flow.py: write WAV as FLOAT subtype for quality - app.py: warmup expanded from 1 to 5 paragraphs per story Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>b714046 -
feat: show paragraph progress during Play + warmup first paragraphs at startup
- Play status shows 'Paragraph X / N' instead of blank - Background warmup pre-generates first paragraph of all 10 stories (stock voice) - Uses disk cache directly so cancel_pregeneration() won't clear warmup results Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>bea718a -
ui: hide chunk/queue processing details from user during Play
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>5ae6bba -
feat: auto-start mic recording on Ask click (100ms user gesture window)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>6a28beb -
fix: add stop_recording JS fallback to auto-submit Q&A
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>6dba563 -
fix: dedup only on auto-submit, manual Get Answer always works
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>26ea281 -
fix: convert Path to str for wave.open (Python 3.13 compat)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>21973a3 -
feat: bounded pre-gen, cancellation, disk cache pruning, GPU lock
- tts.py: limit pre-gen to first 3 chunks (configurable via env vars), cancel_pregeneration() for Ask/book-switch, LRU eviction of story cache, disk cache pruning (max 400 files / 512MB), GPU_INFERENCE_LOCK integration - app.py: cancel pregen on Ask and book select, show target/error status - inference_lfm.py: GPU lock around generate, improved error handling - qa_flow.py: release_audio_submission for retry on error - test_modules/test_tts_pregen.py: new test for pregen flow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>994d3d9 -
refactor: runtime config, Q&A flow module, storage paths, and cleanup
- runtime_config.py: centralized storage paths (supports HF persistent storage) - qa_flow.py: testable Q&A logic with dedup (claim_audio_submission) - tts.py: pregeneration progress tracking (get_pregeneration_status) - app.py: use runtime_config paths, show pregen status on book select, remove flash-attn runtime install, fix profile stories count - README.md: updated for LFM Q&A architecture - .gitignore: add audio_cache/ - requirements.txt: updated deps Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>397b4ac -
perf: 5 latency optimizations for TTS playback
1. Pre-generate all paragraphs on book select (background thread) 4. Audio cache - save WAVs per chunk+voice, skip re-synthesis on replay 5. Reduce LFM Q&A max_new_tokens 200->100 (halves generation time) 11. Eager pre-buffering - serves from cache if pre-gen complete 13. Transition chime (0.3s 440Hz fade) between chunks to mask gaps Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>68f1a16 -
feat: enable FlashAttention-2 for all models via runtime install + SDPA fallback
- app.py: runtime pip install flash-attn at startup (before model loading) - voice_clone.py: pass attn_implementation to both TTS models, fallback to SDPA - inference.py: enable FA2/SDPA for Qwen2.5-3B-Instruct - inference_lfm.py: enable FA2/SDPA for LFM2.5-Audio - requirements_lfm.txt: removed flash-attn (can't compile during Docker build) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>c7cbd46 -
rename: app.py -> app_cascade.py, app_lfm.py -> app.py
LFM variant is now the default app.py for HF Space compatibility. Original 3-model pipeline preserved as app_cascade.py. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>d422be7 -
feat: add LFM2.5-Audio end-to-end Q&A variant
- inference_lfm.py: LFM2.5-Audio-1.5B module (audio-in -> text+audio-out) - app_lfm.py: app variant using LFM for Q&A instead of 3-model pipeline - requirements_lfm.txt: deps including liquid-audio package - Deployed to HF Space: DrSquare/MomsVoiceLFM (A10G GPU) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>c5bd25e -
fix: auto-submit - JS clicks submit 500ms after stop_recording + .change backup
- stop_recording uses JS-only to click submit button after delay - .change() handles actual Python logic when audio value commits - Removed all trigger word references - question_text is fully hidden (visible=False) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>37bfdc1 -
fix: auto-submit Q&A - stop_recording + change + JS fallback click
- .stop_recording calls handle_question_submit directly - .change as backup with audio_path guard - JS fallback clicks submit button 1s after stop (triple redundancy) - Add elem_id to submit button for JS targeting Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>3b13a44