Spaces:
Paused
Paused
Commit History
-
ui: remove text input box from Q&A - voice only
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1769a75 -
fix: remove trigger word, always auto-submit on recording stop
- Remove trigger phrase logic (answer me, etc.) - Wire both .stop_recording() and .change() for reliability - Answer generates automatically when user stops talking - No manual button click needed for voice questions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>df70548 -
perf: 4-chunk pre-buffer + batch into ~5s audio blocks
- Increase queue maxsize from 2 to 4 for deeper pre-buffering - Batch small chunks into ~5s audio blocks before yielding - First chunk yields immediately for fast start - Smoother playback with fewer UI updates and no gaps between segments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>97b533c -
feat: trigger phrase 'answer me' to generate Q&A answer
- Transcribes audio on stop, checks for trigger phrase - If no trigger detected, shows transcription and waits - Trigger phrases: 'answer me', 'answer this', 'tell me' - Strips trigger from question before sending to Q&A model - Text input (button click) still works without trigger Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>748f503 -
perf: reduce TTS latency - shorter chunks + sub-segment streaming
- Split long sentences at clause boundaries (~120 char max per chunk) - Add synthesize_custom_voice_streaming() for partial audio yields - Shorter chunks = faster generation per chunk = smoother playback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>fa6ebf7 -
fix: auto-submit question - use .change() instead of .stop_recording()
.stop_recording fires before audio value is committed in Gradio 5.35. .change fires after the value is set, ensuring audio_path is available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>e942657 -
fix: voice cloning playback - add status indicator, fallback, debug logging
- Show 'PLAYING — Cloned Voice' or 'PLAYING — Stock Voice' in status bar - Add fallback: if cloned synthesis fails, automatically use stock voice - Add logging to stream_tts to confirm profile_id is received Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>2b743ed -
docs: update README - reflect Qwen3-TTS, voice-first Q&A, all current features
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>3cfcf98 -
fix: voice cards clickable - select cloned voice as narrator
- Add onclick JS to voice cards to set voice_selector - Add hidden voice_selector textbox + change handler - Store profile_id in voice list when saving cloned voice - Map card click → voice_profile_state update Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>57efb6d -
revert: voice cloning back to GPU - user will use larger GPU
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>a51c3c3 -
fix: voice cloning OOM on T4 - load 1.7B Base model on CPU
GPU VRAM is fully occupied by TTS 0.6B + Whisper + Q&A 3B. Voice cloning (one-time operation) now runs on CPU to avoid OOM. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>5a98019 -
fix: pause retains position, Ask pauses play, auto-start mic, hide Q&A during play
- Play hides Q&A panel/resume btn when playing - Ask button cancels play_event and auto-starts microphone via JS - stop_recording auto-submits question - Error yield uses current para_idx (not 0) - Fix para_idx computed before error check to avoid NameError Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>08f3c66 -
fix: pause playback on Ask click and tab switch (Explore/Clone)
- Add cancels=[play_event] to ask_btn.click - Add explore_tab.select and clone_tab.select handlers to cancel TTS Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>eacea91 -
fix: Resume button - show Ask btn again, clear audio, add question_audio output
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>9dbd883 -
perf: preload all models at startup, improve Q&A context and auto-submit
- Preload Whisper-small, Qwen2.5-3B-Instruct, and TTS at startup - Use .change() event for auto-submit (fires after audio value committed) - Pass full story context (or top-5 relevant paragraphs) to Q&A - Fix total_mem -> total_memory attribute error Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>c6ae51e -
feat: voice-first Q&A with auto-submit and autoplay answer
- Make voice recording the primary input (moved above text) - Auto-submit when recording stops (end-of-question detection) - Answer audio autoplays immediately - Button text updated to 'Get Answer in Narrator''s Voice' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>0e40ecf -
fix: Ask voice question - null handling, answer visibility
- Handle None/empty question_txt from Gradio (was calling .strip() on None) - Make answer_display visible when returning results - Use gr.HTML(value=..., visible=True) for proper output updates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>2c610fe -
fix: remove custom dtype/attn params to fix CUDA assert on T4
The qwen_tts model has internal dtype handling. Passing float16 + custom attention implementation causes CUDA asserts on T4 (Turing). Use model defaults which handle GPU compatibility internally. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>94fb797 -
fix: CUDA assert on T4 GPU - use eager attention, disable torch.compile
- Revert dtype param to torch_dtype for qwen_tts compatibility - Switch from SDPA to eager attention (SDPA causes asserts on T4/Turing) - Disable torch.compile (unstable on older GPU architectures) - Add clickable book cards on Explore tab (navigates to Library + plays) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>9df2e8c -
docs: update Space metadata (title, SDK version)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>ea9b474 -
fix: replace Supertonic with Qwen3-TTS 0.6B CustomVoice, fix Play button
- Remove all Supertonic TTS references from tts.py and requirements.txt - Add dedicated get_custom_voice_model() loader for 0.6B CustomVoice - Fix speaker name (Chelsie -> vivian, valid for 0.6B model) - Fix torch_dtype deprecation (use dtype parameter) - Fix streaming Audio issue: use autoplay without streaming=True - Replace None yields with gr.update() for non-audio generator outputs - Preload 0.6B model at startup for fast first-play response - Fix Q&A model to use CPU when VRAM insufficient (4GB GPU) - Rename app title to MomsVoice - Update Gradio to 5.35.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>7cc2412 -
feat: persist voice profiles to Voice_Profile/ with auto-load on startup
Voice profile persistence: - Profiles saved to Voice_Profile/<id>/profile.pt + metadata.json on clone - On app startup, most recent profile auto-loaded as default voice - voice_profile_state initialized with saved profile (or None for stock) - synthesize_cloned() falls back to disk if not in memory cache - has_profile() checks both memory cache and disk - create_voice_profile() now accepts voice_name param for metadata - Player shows actual cloned voice name (from metadata) instead of generic label New APIs in voice_clone.py: - save_profile_to_disk(profile_id, voice_name) -> Path - load_profile_from_disk(profile_id) -> bool - list_saved_profiles() -> list[dict] - load_default_profile() -> str | None Voice_Profile/ added to .gitignore (user data). 102 tests pass (28 latency/persistence + 74 integration). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>0d420e4 -
fix: move CSS from Blocks constructor to launch() for Gradio 6.0
Fixes UserWarning about deprecated css parameter in gr.Blocks(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>fbfbf8d -
docs: update sprint.md with progress summary and remaining tasks
19/25 tasks complete (76%). Added progress summary at top, remaining tasks table at bottom with priority/critical path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>ee79c05 -
test: add comprehensive integration test suite (74 tests)
Covers module imports, story loading, chunk splitting, HTML rendering, XSS escaping, Gradio wiring, handler signatures, voice profile integration, state machine consistency, app launch readiness, and file structure validation. All 92 tests pass (18 latency + 74 integration). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>122c643 -
refactor: remove dead UI elements, tighten model integration
Front-end cleanup: - Remove narrative_subtitles (defined but never used) - Remove loading_spinner (always hidden, never shown) - Remove 5 unused chime WAV files (willow/sky/deep/baker/letters) - Remove empty_state_sim debug checkbox from library tab - Remove dead Profile tab checkboxes (denoising, sleep wave, transitions) - Remove sandbox outage simulation (debug-only feature) - Remove system_error_modal and offline_toggle handler - Rename html variable to avoid shadowing html module - Fix html.escape on voice names and book titles in library/clone cards - Fix XSS in library card JS onclick (escape quotes in titles) Integration tightening: - Timeline slider now auto-advances during TTS playback - Story text highlight syncs with current playback chunk - Story-finished panel shown when last chunk completes - Player shows 'Your Cloned Voice' when voice profile active - Resume button now shows Play (ready state) instead of fake PLAYING - Profile tab updated with actual model pipeline info…c4b102f -
perf: add TTS latency optimizations
Optimizations applied to voice_clone.py and tts.py: - Auto-select bfloat16 (Ampere+) or float16 per GPU architecture - FlashAttention-2 when available, SDPA fallback - Streaming mode (non_streaming_mode=False) - Reduced sampling: top_k=20, temperature=0.7, max_new_tokens=1024 - torch.set_float32_matmul_precision('high') - torch.compile on decoder/predictor submodules (best-effort) - Reference audio trimmed to 10s max for faster embedding extraction - 0.6B CustomVoice model as fast non-cloned fallback (env: QWEN_TTS_MODE) - Added librosa to requirements.txt - FlashAttention-2 install instructions in requirements.txt - 18-test suite for all optimization configs (test_latency_optimizations.py) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>d3a755c -
docs: update all docs to reflect Qwen3-TTS architecture
Update README.md, SPEC.md, tech_stack.md, sprint.md, and mission.md: - Replace QWEN-TTS-0.6B references with Qwen3-TTS-1.7B-Base - Add Supertonic as explicit fallback in model tables - Update architecture diagram with modular file structure - Update VRAM budget estimates for new model lineup - Update project structure with voice_clone.py, tts.py, inference.py - Update risk mitigations for Qwen3-TTS latency characteristics - Update key decisions with actual model choices and module design Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>e308c53 -
feat: implement real voice cloning with Qwen3-TTS (sprint step 3)
- Add voice_clone.py: Qwen3-TTS model wrapper with server-side profile cache, create_voice_profile() and synthesize_cloned() API - Refactor tts.py: backend-neutral interface delegates to Qwen3-TTS when voice_profile_id provided, Supertonic fallback otherwise - Wire app.py: real cloning in animate_cloning_pipeline, voice profile flows via gr.State to narration (stream_tts) and Q&A - Fix XSS: html.escape in render_story_text and clone success card - Fix misleading fallback: hide audio widget when TTS fails instead of playing fake chime audio - Add qwen-tts to requirements.txt - Update copilot-instructions.md with new architecture Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>215fff0 -
fix: XSS sanitization, per-request audio files, soundfile-based ASR
- HTML-escape LLM output and user input before rendering in gr.HTML - Use UUID-based filenames for Q&A audio to prevent concurrent overwrites - Load audio via soundfile instead of ffmpeg for cross-platform ASR support Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>d70ebd4 -
feat: wire Whisper-small ASR and Qwen2.5-3B Q&A into app (sprint steps 9-10)
- Add inference.py: on-demand Whisper-small transcription + Qwen2.5-3B-Instruct grounded story Q&A with context retrieval - Update app.py handle_question_submit to use real ASR + Q&A + TTS pipeline - Add test_modules/test_whisper_qwen.py for model verification - Add .github/copilot-instructions.md for Copilot context - Update sprint.md: mark steps 9 and 10 complete - Add sample_sounds/ to .gitignore (generated at runtime) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>e99dd36 -
Merge origin/master: adopt gradio==5.33.0 compatibility fix
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8ca9f59 -
Update sprint.md: mark completed tasks through Day 2 morning
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6df2a65 -
Merge HuggingFace_Hack/main: real TTS pipeline + asset overhaul
app.py: dynamic story loading from stories/, CSS from static/style.css, integrated library+player tab, real TTS streaming via tts.py requirements.txt: pin gradio==5.35.0, add supertonic/onnxruntime/hf-hub README.md: prepend HF Space YAML header, keep full project README New: tts.py, static/style.css, assets/covers/, SPEC.md, docs/, test_modules/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>addb9c9
-
Merge pull request #7 from MomsVoiceAI/fix/hf-bug
bumpup gradio 5.35 for font issue23ba92f -
bumpup gradio 5.35 for font issue
8760cce -
add requirement for supertonic
5c27921 -
fix: add quoted sdk_version and python_version to HF Space README
e1723cf -
commit README for hf space
353c4cc -
Merge pull request #3 from MomsVoiceAI/frontend/gradio-ui
feat: Library+Player 통합, 커버 이미지 로컬화, 스토리 텍스트 뷰어3b5ca70 -
chore: revert .gitattributes to filter=lfs (git-xet is an LFS transfer agent)
8ddfae2 -
chore: switch binary tracking from LFS to Xet for HuggingFace
Update .gitattributes to use filter=xet for *.png, *.jpg, *.jpeg, *.wav, *.mp3, *.gif, *.webp — required by HuggingFace Spaces which uses Xet storage instead of Git LFS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8ddf108 -
feat: integrate Supertonic TTS with sentence-level chunk streaming
- Add tts.py: lazy singleton TTS loader, sentence-level text splitter, and background-threaded generator that synthesizes chunks into a bounded queue and yields (sample_rate, wav, idx, total, err) per chunk - Update app.py: add tts_chunks_state; on book select, split full story text into TTS sentence chunks stored in state - Switch player_audio_control to streaming=True / type=numpy / autoplay=True - Replace play_btn handler with stream_tts generator that synthesizes and streams audio chunks one by one with live chunk progress in the status bar - Add test_modules: supertonic demo, clone demo, and TTS module spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> chore: add .gitattributes for Git LFS binary tracking Track *.png, *.jpg, *.jpeg, *.wav, *.mp3, *.gif, *.webp via Git LFS so HuggingFace Space accepts the push. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5f8f265 -
Merge pull request #4 from MomsVoiceAI/fix/image-path
fix bug of image path traversaldb3ba51 -
Merge pull request #4 from MomsVoiceAI/fix/image-path
fix bug of image path traversalf7f3c86 -
fix gradio version 5.33 for compatibility
287ae96 -
fix gradio version 5.33 for compatibility
9ea269a -
fix bug of image path traversal
729a148 -
fix bug of image path traversal
dacc38c
-
chore: add HF Space yaml header to README.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3e62d57