Spaces:
Sleeping
Sleeping
Commit History
-
Per-turn telemetry + RAG few-shot on phrasebook miss
jefffffff9Telemetry (src/engine/turn_logger.py) Thread-safe JSONL append logger writing one self-contained row per turn to data/field_turns.jsonl (overridable via FIELD_TURNS_PATH). Captures ts, tab, langs, transcript/user_text, phrasebook hit details, llm model + ms, reply, tts ms, total ms, error. Foundation for field-test review, phrasebook hit-rate measurement, and Stage-4 training-data curation. Never raises — telemetry must not break the user-facing pipeline. RAG few-shot (src/llm/phrasebook.py + src/llm/minimal_client.py) - phrasebook.top_k(text, lang, k=3): nearest-K phrasebook entries regardless of threshold, sorted by descending fuzzy score. - MinimalClient.chat() now accepts extra_examples; _build_system_prompt appends them as a second 'Additional reference phrases relevant to the current user input' section after the 30-pair anchor list. app_minimal.py - Both run_pipeline (voice) and run_text_pipeline (text) now share a single _resolve_reply() help…064d08b
-
Add confidence loop, curiosity engine, and lightweight TTS
jefffffff9 +1: Claude Sonnet 4.6Task 1 — TTS refactor (src/tts/waxal_tts.py): Switch Bambara TTS from Qwen2-based MALIBA-AI to ynnov/ekodi-bambara-tts-female (VitsModel + AutoTokenizer) — much lighter on CPU Basic; no trust_remote_code needed. Fula is an explicit generate_pular_tts() placeholder returning None until the model is trained. Task 2 — Active learning / confidence loop (src/engine/stt_processor.py): transcribe_with_confidence() wraps Whisper generate() with output_scores=True and computes avg_logprob via compute_transition_scores(). If avg_logprob < -1.0, app_lab.py replaces the transcript with CONFUSION_PROMPT so the LLM asks the user in English to repeat and explain the word. Task 3 — Proactive gaps (src/engine/curiosity.py): CuriosityEngine.maybe_ask() fires every 5 interactions — sends the last 10 vocabulary entries to Qwen and appends a 🌱 question in the chat asking the user to teach a missing agricultural term. Task 4 — Zero-cost persistence: MemoryManager._push_to_h…3657607
-
Initial commit: Sahel-Agri Voice AI
jefffffff976db545