Spaces:
Sleeping
Sleeping
Commit History
-
push docs and script
Broulaye Doumbiacc8b90c
-
Add torchcodec install for datasets 4.x audio decoding
jefffffff9 +1: Claude Opus 4.7datasets >= 4.0 uses torchcodec as the audio backend; prepare_dataset would fail with ImportError on batch['audio'] without it. - scripts/runpod_setup.sh: pip install torchcodec with torch-version pinning fallback (0.1/0.2/0.3/0.4 → torch 2.4/2.5/2.6/2.7+) - kaggle_master_trainer.ipynb Cell 2: defensive try/except install so the notebook is self-healing on any fresh environment Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>bb78cbf -
Prepare training stack for RunPod: env-aware notebook + bootstrap script
jefffffff9 +1: Claude Sonnet 4.6Cell 3 now auto-detects Kaggle (/kaggle/working), Colab (/content), RunPod (/workspace), or local — and adjusts defaults per environment. On RunPod the base model defaults to whisper-large-v3-turbo (128 mel bins, matches the Space and fits in 24 GB VRAM); on Kaggle T4 it stays on whisper-small to avoid OOM. Batch size / grad accumulation tuned per card (8x4 on 24 GB vs 16x2 on T4, both yield effective batch 32). TRAIN_LANG, HF_USERNAME, and WHISPER_MODEL_ID are now env-var overridable so the notebook can be driven headlessly from a shell. scripts/runpod_setup.sh bootstraps a fresh pod: - clones the Space repo into /workspace/sahel-voice - installs training deps (peft, evaluate, tensorboard, etc.) that are intentionally absent from the HF Spaces runtime requirements.txt - sources .env for HF_TOKEN; falls back to prompting the user - creates persistent checkpoint dirs on the Volume disk so adapters survive pod stop/start - prints GPU / VRAM sanity check at the end C…9049ef3
-
Phase 3: Voice-to-Voice S2S pipeline — F5-TTS, LLM brain, CER metric
jefffffff9 +1: Claude Sonnet 4.6app.py: - Add LLM_MODEL_ID env var (default: Qwen/Qwen2.5-72B-Instruct) - Import GemmaClient + bam_normalize at module level - Add _voice_ref_path / _voice_ref_text / _llm_client state - Add set_voice_reference(): converts MP3->24kHz WAV, auto-transcribes - Add _convo_pipeline(): ASR -> bam_normalize -> LLM (phonetic Bambara system prompt) -> F5-TTS (voice ref) with MMS-TTS fallback - handle_ask() accepts convo_mode=bool, routes to _convo_pipeline or the original sensor pipeline accordingly - Tab 1 UI: Conversation Mode toggle, Voice Reference upload accordion, stop_recording auto-submit for true back-to-back loop src/tts/f5_tts.py (new): - Lazy-loaded F5TTS wrapper; synthesize() with ref_wav + ref_text - to_wav_24k() resampler (F5-TTS needs 24 kHz input) - Graceful fallback (returns None) when f5-tts not installed src/data/bam_normalize.py (new): - _bam_norm(): ou->u, dj->j, gn->ny, ch->c, oo->o-open, ee->e-open - Used at inference (app.py) and training (notebook Cell 11) req…8952fff
-
Fix Kaggle push: title slug + Windows UTF-8 encoding
jefffffff9 +1: Claude Sonnet 4.6- kernel-metadata.json: title changed to 'Sahel Voice Master Trainer' so its slug matches the id 'sahel-voice-master-trainer' - push_to_kaggle.sh: export PYTHONUTF8=1 + PYTHONIOENCODING=utf-8 so the Kaggle CLI reads emoji in notebook cells correctly on Windows Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>842ded5 -
Update push_to_kaggle.sh: accept KAGGLE_API_TOKEN env var (new API tokens)
jefffffff9 +1: Claude Sonnet 4.6kaggle CLI >= 1.8.0 supports KAGGLE_API_TOKEN env var instead of the legacy kaggle.json file. Check for either; error only if both are absent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>ac2363f -
Add Kaggle auto-sync: kernel-metadata.json + post-commit hook
jefffffff9 +1: Claude Sonnet 4.6- notebooks/kernel-metadata.json: tells the Kaggle API the kernel ID, title, GPU flag, and which .ipynb to upload - scripts/push_to_kaggle.sh: runs 'kaggle kernels push' from the notebooks/ directory; checks for kaggle CLI and kaggle.json first - .git/hooks/post-commit: detects if kaggle_master_trainer.ipynb was in the commit and calls push_to_kaggle.sh automatically Setup (one-time): pip install kaggle # download kaggle.json from kaggle.com → Settings → API cp ~/Downloads/kaggle.json ~/.kaggle/kaggle.json After that, every 'git commit' that touches the notebook will push the updated version to Kaggle automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4bd45bb
-
Initial commit: Sahel-Agri Voice AI
jefffffff976db545