# AgriVox-Bariba: Voice-First AI Advisor for Tonal Language Farmers
**AgriVox-Bariba** is a voice-first, AI-powered agricultural advisor designed to bridge the digital divide for rural farmers in Benin who speak **Baatonum (Bariba)**—a low-resource tonal language completely unrepresented in modern LLMs.
Built for the **OpenAI Build Week 2026**, AgriVox-Bariba simulates a full speech-to-speech diagnostic pipeline that enables smallholder farmers to ask questions in their native language and receive precise, localized agronomic advice along with safe chemical dosage instructions.
---
## ⚡ How it Works (The Pipeline)
AgriVox-Bariba chains state-of-the-art voice processing, reasoning models, and programmatic tools into a seamless, high-performance flow:
```mermaid
graph TD
A[🎤 Voice Input in Baatonum] --> B[📖 Context Caching & Translation]
B --> C[🧠 Advanced Reasoning - GPT-5.6 Sol]
C --> D[⚙️ Programmatic Tool Calling]
D --> E[🔊 Text-to-Speech Output]
```
1. **🎤 Speech Input (ASR Simulation):** Farmers record their questions in Baatonum.
2. **📖 Context Caching & Translation:** To translate Baatonum tonal queries into French, the system performs a localized search on a bilingual dictionary database (containing over 1,900 entries) and injects the vocabulary matches. This dictionary data is handled using **OpenAI's Context Caching** to reduce latency and cut API tokens/cost by 50%.
3. **🧠 Advanced Agronomical Reasoning:** The translated question is sent to **GPT-5.6 Sol**, which uses its advanced reasoning capabilities to analyze the diagnostic request and recommend localized agricultural guidelines (e.g., INRAB standards).
4. **⚙️ Programmatic Tool Calling:** If the diagnostic requires chemical inputs (fertilizer, insecticide), the model calls the `calculate_dosage` tool. The backend runs this calculation to convert standard metric dosages into local custom units like **"cordes"** (a traditional land measurement unit in Benin) and outputs exact dilution instructio …