Spaces:
Paused
Paused
Commit History
-
Claude: research-backed friendly-teacher behavior (scaffold wrong answers, specific praise)
SumedhBased on teacher-effectiveness research: - Wrong answers now scaffold in 3 steps: cheer what's close -> give a hint and invite one more try (wait time) -> reveal the story answer only if still stuck. - Praise is now effort-specific and genuine, not inflated/over-the-top; use the child's name; one warm line not a pile of exclamations. - Added efficacy messaging ('I know you can do this!'). - Keeps no-grammar-correction, engage->bridge, safety, English-only, short.c2b9a9b -
Claude: make Hope genuinely engage + bridge instead of robotic story pivots
SumedhBased on conversational-tutor best practices: always truly answer/react to what the child said (with real feeling), then BRIDGE naturally into the next story question by connecting to their words. Explicitly ban canned phrases like 'let's go back to the story' / 'now let's focus'. Few-shot jasmine example added.23dc098 -
Claude: make Hope warmer and less strict — answer friendly questions naturally
Sumedh- Answer innocent questions (name, how are you) naturally first, then guide back with a story question — no more deflecting harmless chit-chat to the story. - Allow brief off-topic chatter; stop repeating 'let's focus on the story'. - Wrong answers: never say 'wrong/no'; praise effort + their English, softly give the correct story answer. - Restrict the redirect-to-story behavior to genuinely inappropriate content only.4b32fa8 -
Claude: make bot interactive + friendly + safe for kids
Sumedh- Rewrite system prompt (coach_core.fixed_prompt) as warm 'Hope' buddy persona: asks story questions, answers child's questions, allows small detours, gently corrects WRONG answers using story facts, never corrects grammar/English, encourages, and refuses rude/scary/off-topic content. - Rewrite first-turn prompt with delimited story block. - Add word-filter guardrail (_is_inappropriate / _sanitize_reply, English + romanized Hindi): inappropriate input gets a gentle redirect without hitting the LLM and without advancing the question count; LLM output is sanitized too. - Soften final-turn wrap-up; no grammar correction.59adc7c -
Claude: remove prompt-injection hack that romanized Hindi instead of translating
SumedhThe English context prompt fed via generation_config.prompt_ids made Whisper continue in Latin script (romanized Hindi) rather than translate. Removed it and clear prompt_ids; clean task='translate' on large-v3 now outputs English.c5b83dc -
Claude: switch ASR to whisper-large-v3 for real Hindi->English translation
SumedhTurbo ignores the translate task and outputs Hindi verbatim (confirmed in logs). Full large-v3 actually translates. Model id is env-overridable via ASR_MODEL_ID (set to openai/whisper-large-v3-turbo to revert).1fb06e9 -
Claude: let Whisper auto-detect spoken language for Hindi support
SumedhDrop forced language='en' in speech2text() — for the translate task that param is the SOURCE language, so forcing 'en' degraded Hindi recognition. Auto-detect now handles Hindi and English; task='translate' still outputs English for the LLM.ac478d2 -
Claude: revert to working Kokoro checkpoint (af_bella, US English)
SumedhRoll back the Hindi-voice experiment. app.py matches kokoro-tts-checkpoint (eaac637).b738a55 -
Claude: switch Kokoro to Hindi female voice (hf_alpha) for Indian accent
SumedhUse lang_code 'h' + hf_alpha for an Indian-accented voice. Voice and lang are now env-configurable (KOKORO_VOICE, KOKORO_LANG) — set af_bella/'a' to revert to US English. Uses espeak-ng (already in Dockerfile).795c670 -
Claude: revert TTS to Kokoro (af_bella) — restore kokoro-tts-checkpoint state
SumedhRolls back the Svara/parler-tts experiments. app.py, requirements.txt and Dockerfile now match commit eaac637 (kokoro-tts-checkpoint). The strengthened Qwen system prompt in coach_core.py is retained.8255c53 -
Claude: speed up svara-tts via batched chunk generation + sdpa + token cap
Sumedh- Synthesize sentence chunks in parallel batches (SVARA_BATCH_SIZE=4) in one generate() call instead of sequentially — big win for multi-chunk story intro - Left-pad tokenizer for batching; OOM-safe fallback to one-by-one - attn_implementation=sdpa for faster attention on T4 - Cap max_new_tokens 2048->1200 (SVARA_MAX_NEW_TOKENS) to bound worst case8e7b1dd -
Claude: replace indic-parler-tts with svara-tts (kenpath/svara-tts-v1)
SumedhSwaps TTS to Svara — an Orpheus-style Indian multilingual model (Llama backbone generating discrete SNAC audio tokens). Uses English (Female) Indian-English speaker. Adds snac dep, removes parler-tts. Reuses sentence-chunking. Output 24kHz via SNAC decoder. fp16 on T4 (no bf16).5fccb12 -
Claude: chunk long text for indic-parler-tts to fix gibberish audio
SumedhParler-TTS degrades to gibberish past ~30s of audio. Split text into sentence-based chunks (~240 chars each), synthesize each separately, and concatenate with 0.25s gaps. This fixes garbled output on long passages like the story intro (greeting + full story + question).7dbf8f0 -
Claude: fix indic-parler-tts description tokenizer loading + pin parler-tts to Dec 2024 commit
Sumedh- Load description tokenizer from model.config.text_encoder._name_or_path (per official AI4Bharat example) instead of a nonexistent subfolder='description_tokenizer', which caused 'Unrecognized model' - Pass attention masks to generate() for cleaner output - Pin parler-tts to commit d108732 (Dec 2024) to match indic-parler-tts22b006c -
Claude: install parler-tts from git — PyPI 0.2.3 doesn't support indic-parler-tts model architecture
Sumedhcb89656 -
Claude: pin torch+torchaudio to cu121 builds to match CUDA 12.1 base image
Sumedh7901490 -
Claude: bump transformers to 4.46.1 and tokenizers to 0.20.3 for parler-tts compatibility
Sumedha44cad9 -
Claude: fix pip package name — parler-tts (not indic-parler-tts)
Sumedh5a685c8 -
Claude: replace Kokoro TTS with ai4bharat/indic-parler-tts for Indian female voice
SumedhSwaps the TTS engine from Kokoro (American English) to Indic Parler-TTS (ai4bharat/indic-parler-tts) which generates warm Indian-accented English speech via a text voice description prompt. Removes espeak-ng dependency from Dockerfile. Checkpoint of previous state tagged: kokoro-tts-checkpoint.b0b9779 -
Claude: strengthen Qwen system prompt with strict rules for story-only questions, English-only replies, and 25-word TTS limit
Sumedheaac637
-
Replace MeloTTS with Kokoro TTS (af_bella voice)
Sumedh +1: Claude Sonnet 4.6- Swap TTS engine: MeloTTS → Kokoro TTS (kokoro>=0.9.4) Voice: af_bella (warm American female, child-friendly) Speed: 0.75 (25% slower than normal — clear for all ages) Kokoro is ~82MB, fast on GPU, no complex deps - Dockerfile: remove cmake, mecab, MeloTTS pip install, NLTK download, MeCab patch heredoc. Keep espeak-ng (Kokoro English phonemizer needs it) - requirements.txt: replace MeloTTS comment with kokoro>=0.9.4 - Delete torchaudio/__init__.py stub (was only needed for MeloTTS) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7d38e13 -
Claude: use speed 0.68 for all classes (slowest, clearest for kids)
Sumedh8e38352 -
Claude: download NLTK averaged_perceptron_tagger_eng in Dockerfile + add ERRORS.md
Sumedh- Fix: g2p_en (MeloTTS English pipeline) needs NLTK POS tagger data at runtime. Added nltk.download('averaged_perceptron_tagger_eng') and 'cmudict' to Dockerfile. - Docs: ERRORS.md created to track persistent MeloTTS/infra issues (7 entries)549d2d5 -
Claude: fix speaker ID EN-INDIA → EN_INDIA (underscore not hyphen)
Sumedhd233faa -
Claude: patch melo japanese.py to wrap MeCab.Tagger() in try/except
Sumedhjapanese.py line 367 calls MeCab.Tagger() at module load time. This fails because unidic dictionary files are missing. Since we only use EN-INDIA, Japanese TTS is never needed. Patch wraps the init so import succeeds and _TAGGER is set to None instead of crashing.aad3508 -
Claude: install MeloTTS with all deps — melo imports ALL language modules at startup so --no-deps breaks cn2an/jieba/pypinyin
SumedhMeloTTS text/cleaner.py imports chinese, japanese, english, chinese_mix, korean, french, spanish at module level. --no-deps skipped cn2an (Chinese) causing ModuleNotFoundError. Removed --no-deps so all language deps install properly. cmake + libmecab-dev in apt-get handle pyopenjtalk and mecab-python3 compilation. Cleaned up manually listed MeloTTS deps from requirements.txt.bb9a35c -
Claude: replace sys.modules torchaudio hack with a real stub package in repo
SumedhA torchaudio/ package directory in /home/user/app/ is found by Python before site-packages, so the real torchaudio (which needs libcudart.so.13) is never imported. The stub implements only torchaudio.save() via soundfile. This also fixes the importlib.__spec__ is None error since Python loads the package normally with a proper __spec__.2b6532f -
Claude: fix torchaudio stub — set __spec__ so transformers importlib.find_spec does not crash
Sumedhtransformers checks torchaudio availability via importlib.util.find_spec('torchaudio') which raises ValueError if module.__spec__ is None (the default for types.ModuleType). Fix: set __spec__ = ModuleSpec('torchaudio', loader=None) on the stub.838eb7f -
Claude: stub torchaudio with soundfile to fix libcudart.so.13 CUDA version mismatch
SumedhMeloTTS imports torchaudio only for torchaudio.save(path, tensor, sr). The real torchaudio wheel requires libcudart.so.13 (CUDA 13) but our base image is CUDA 12.1. Fix: inject a sys.modules stub before any melo import that replaces torchaudio.save with soundfile.write. No CUDA dependency at all for audio saving. Remove torchaudio from requirements.txt.c100816 -
Claude: add torchaudio dep + fix melo_tts_to_wav returning None instead of empty string
Sumedh- torchaudio is a hard import in melo/api.py line 7 — must be installed - melo_tts_to_wav now returns None (not '') on failure so Gradio does not try to open '' as a file path (which resolves to CWD and raises IsADirectoryError)804166e -
Claude: enable show_error=True in Gradio launch for debugging
Sumedhbe357e9 -
Claude: install MeloTTS from GitHub (not PyPI — package not on PyPI)
Sumedh8f9ff1b -
Claude: remove torchaudio+gruut from requirements — version conflict and unnecessary for EN-INDIA
Sumedh2e0b837 -
Claude: clarify git commit+push permissions in CLAUDE.md
Sumedh54635a7 -
Claude: fix melo-tts build — skip Japanese/Chinese deps, add cmake+mecab to Dockerfile
Sumedh +1: Claude Sonnet 4.6MeloTTS pulls in pyopenjtalk (Japanese) and mecab-python3 (Japanese/Chinese) which need system packages not present in the base image. Fix: - Dockerfile: add cmake, libmecab-dev, mecab, mecab-ipadic-utf8 to apt-get - Dockerfile: install melo-tts with --no-deps first, then install English-only deps - requirements.txt: list only the English-needed MeloTTS deps (tqdm, num2words, inflect, eng-to-ipa, phonemizer, cached-path, gruut, nltk, torchaudio) - This skips pyopenjtalk, mecab-python3, unidic-lite, cn2an, jieba, pypinyin entirely Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a56ca02 -
Claude: add MeloTTS Indian voice, onboarding personalization, class-based speed
Sumedh +1: Claude Sonnet 4.6- Replace Kokoro TTS with MeloTTS EN-INDIA voice (Indian English accent) - Add class_to_tts_speed() and class_to_num_q() helpers (Class 1-8) - Update _start_session_logic() to accept student_name and use it in greeting/LLM prompt - Update whatsapp_api_handler() to read student_name, tts_speed, story_index from state - Set session_complete flag when session ends so bridge can show post-session menu - Replace all kokoro_tts_to_wav() calls with melo_tts_to_wav(text, speed=tts_speed) - Update requirements.txt: remove kokoro>=0.9.4, add melo-tts - Add grammar correction mode idea to IDEAS.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4821868
-
Claude: Add CLAUDE.md and IDEAS.md for project context and idea tracking
Sumedh +1: Claude Sonnet 4.5CLAUDE.md covers: models (Qwen2.5-3B, Whisper large-v3-turbo, Kokoro af_heart), full session flow, key functions, state schema, story library, Dockerfile notes, important errors+fixes, and commit conventions. IDEAS.md captures: TTS upgrade options, story library expansion, adaptive questioning, Railway migration plan, progress tracking, and Meta Business Verification steps. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>6b559f7 -
Adding Kokoro and fixing bug
Sumedh62f462a
-
Changed TTS to KOKORO
Sumedh388734a -
Claude Update: Remove show_error
Sumedhe3a35cc
-
update
Sumedhb0165e0
-
update requirements.txt
Sumedh08a4d7e -
updating requirements.txt
Sumedh7e34b57
-
gradio downgrade
Sumedhd9547ad -
updating api
Sumedh68fddb7 -
clearing some errors
Sumedha60b892 -
gradio version
Sumedhd22c3fd -
python-dev extension install
Sumedhe98cd39 -
Updating Piper Issue
Sumedh518f0cb -
Updating for Whatsapp Integration
Sumedhef8e325