Inspiration
What it does Sagot sa Bukid — Voice Q&A for Filipino Farmers
Inspiration
"Maayong buntag, pare. Unsa may tambal sa langaw sa saging?"
That was the voice of Mang Juan, a 58-year-old banana farmer from Davao. He walked 12 kilometers to the nearest agricultural extension office — only to find it closed. Again. The internet he had was a battered Android phone with 1GB of data and a screen so cracked it looked like a rice paddy in the dry season.
This is the reality of 10 million Filipino smallholder farmers. They feed the nation, yet they are the ones most starved of information. The agricultural extension system — designed to bring science to the farm — is underfunded, overstretched, and reaches less than 15% of farmers. When your banana crop is wilting from bacterial wilt, you don't have time to wait for a pamphlet that never comes.
I built Sagot sa Bukid ("Answer in the Field") because it should not take a 12-kilometer walk to ask a simple question about a banana fly.
What it does
A voice-first Q&A system designed for Filipino farmers who cannot read or write in English — or at all.
- Speak in your mother tongue: Ask in Cebuano, Ilocano, Hiligaynon, Waray, Tagalog — and get answers back in the same language, spoken aloud
- Four tools for the farm: Q&A engine, crop disease diagnosis (upload a photo), weather lookup, and a community board where farmers help each other
- Works when the internet doesn't: An offline phrasebook cache with 80+ farming question-answer pairs so even a farmer with zero signal can get answers
- Zero literacy required: Entirely voice-driven — you talk, the app talks back
How I built it
The architecture is a pipeline of despair turned into hope:
Speech (Whisper) -> Translation (NLLB 200) -> Reasoning (Gemini) -> TTS (Edge TTS)
Every stage was a fight:
- Speech-to-text (Whisper via Hugging Face): Filipino accents + field noise = garbage transcripts. Fine-tuned prompts saved it.
- Translation (Meta NLLB 200 1.8B params): No "No Language Left Behind" — except there is, because these models barely fit in a free-tier GPU. Had to quantize and pray.
- Reasoning (Gemini API): Gemini gets farming context. It stopped suggesting "use pesticide" when the question was about organic compost.
- TTS (Edge TTS - free): Works. Miracles do happen.
- Frontend (Next.js 16 + Tailwind CSS 4): Because farmers deserve an app that doesn't look like a government website from 2003.
The offline cache uses a hand-built phrasebook of 80+ real farming Q&A pairs compiled from DA extension manuals — translated into 5 Philippine languages. When the API calls fail (and they will, because Philippine internet is a prayer), the app falls back to the phrasebook instantly.
Challenges I faced
Languages break everything. NLLB's tokenizer treats Cebuano as a mistranslation of Indonesian. I wrote custom normalization rules just to get basic questions through.
Latency is a dealbreaker. A full pipeline run (STT -> NLLB -> Gemini -> TTS) takes 12-18 seconds. For a farmer standing in the heat, that is an eternity. I added aggressive caching, reduced NLLB to 4-bit quantization, and swapped Gemini Flash for speed.
Audio is hard. The Web Audio API, microphone permissions, recording formats — every browser does it differently. Safari on a low-end Android? Good luck. I spent more time on getUserMedia error handling than on the actual AI.
Domain knowledge. I am not a farmer. I had to learn what langaw sa saging (banana fly) actually is — Cosmopolites sordidus, a weevil that destroys banana corms. I read DA manuals, watched agri vlogs, and interviewed a smallholder farmer in Batangas to make sure the answers were correct, not just translated.
The guilt of offline. Every time the API call fails and the app shows a cached answer, I feel like I failed the user. A cached answer is better than nothing — but it is not the same as real-time, personalized advice. That guilt is now a TODO list.
What I learned
- Small models, big heart. NLLB 200 1.8B quantized to 4-bit still translates Cebuano to English with surprising fidelity. Open-source models do work — you just have to fight them into submission.
- Edge deployment is not optional. If your app requires a stable 4G connection in the Philippines, you have already excluded your target user.
- Design for the lowest common denominator. A farmer's phone is likely an Android Go device with 2GB RAM. Every animation, every bundle byte, every API call must justify its existence.
- The best AI is the one that speaks their language — literally. When the app said "Pahiran ug sinagol nga apog ug asin ang samad sa punoan" (Apply a mixture of lime and salt on the trunk wound), Mang Juan did not just get an answer. He felt heard.
Built With
- front-end:-next.js-16
- google-gemini-api
- meta-nllb-200-(hugging-face)
- microsoft-edge-tts-database:-json-file-(phrasebook.json-for-offline-cache)
- openai-whisper-(hugging-face)
- react-19
- tailwind-css-4
- typescript-back-end:-next.js-api-routes
Log in or sign up for Devpost to join the conversation.