# A.N.A - Swahili Voice AI Customer Care Assistant
A.N.A (Ana Neural Assistant) is a Swahili-speaking AI customer service assistant built for telecom customer care. It replaces rigid IVR-style interactions with natural language chat and voice support for mobile network scenarios such as M-Pesa balance inquiries, airtime balance checks, internet bundle details, and escalation to a human support agent.
The application features a Python-based core API backend and a responsive Next.js frontend with browser speech recognition, automated greeting audio playback, continuous hands-free voice loops, silence timeout detection, and real-time telemetry logging.
---
## π Key Features
* **Hands-Free Voice Loop**: The frontend automatically reactivates the microphone when A.N.A's speech ends, allowing natural, continuous conversation.
* **Silence Auto-Stop**: The microphone automatically shuts off if no speech is detected for 5 seconds to prevent infinite recording loops.
* **Polite Closure Detection**: The assistant detects goodbyes (e.g., *"asante"*, *"hapana"*, *"sawa"*) and cleanly terminates the voice loop.
* **Hybrid LLM Backend**: Automatically detects keys in `.env` to route requests to cloud APIs (Groq or OpenRouter) or fall back to a local **Ollama** server running `gemma2-swahili` offline.
* **Dynamic Telemetry & Logs**: The UI displays simulated CRM profile data, active intent class, API logs, response latency, and auth vectors in real time.
---
## π Project Structure
```text
ana-swahili-assistant/
βββ ana.py # Core Python CLI & built-in HTTP API server (port 5000)
βββ backend.py # Optional FastAPI backend for deeper telecom simulation
βββ setup.ps1 # Windows script to download and register gemma2-swahili with Ollama
βββ setup.sh # Linux/macOS setup script
βββ .env.example # Example environment configuration
βββ README.md # Main project documentation (This file)
βββ agents.md # Agent design and persona dir β¦