| title | FinVoice |
|---|---|
| emoji | 🏦 |
| colorFrom | blue |
| colorTo | indigo |
| sdk | gradio |
| sdk_version | 4.36.0 |
| app_file | app.py |
| pinned | false |
An autonomous, multi-lingual AI voice agent built for the Banking, Financial Services, and Insurance (BFSI) sector. This system is designed as a Forward Deployed Engineering (FDE) prototype that routes real-time voice queries using a stateful agent graph, processes Retrieval-Augmented Generation (RAG) for banking policies, calls mock REST APIs for customer data, and gracefully escalates frustrated customers to human agents.
- Stateful Reasoning (LangGraph): Uses a deterministic Directed Acyclic Graph (DAG) to guarantee reliable API routing and avoid infinite AI loops.
- Multilingual Voice-to-Voice:
- STT: Leverages Groq's
whisper-large-v3-turbofor instantaneous multilingual transcription. - TTS: Uses Microsoft Azure Neural TTS (
edge-tts) to generate hyper-realistic, native-sounding Indian regional accents (Hindi, Tamil, Marathi, Telugu, etc.)
- STT: Leverages Groq's
- RAG Vector Search: Uses HuggingFace Embeddings (
all-MiniLM-L6-v2) and FAISS to retrieve real banking policies locally. - Contextual API Tool-Calling: Executes backend mock functions (e.g.
get_loan_status,check_kyc) dynamically based on user intent. - Dynamic Slang Generation: Employs a 120-Billion parameter LLM (
openai/gpt-oss-120bvia Groq) specifically prompted to generate colloquial conversational dialects rather than robotic formal text.
- Agent Framework: LangGraph, LangChain
- LLM:
gpt-oss-120b(Groq API) - Backend: FastAPI, Python 3.10+
- Frontend: Gradio (Enterprise UI Theme)
- RAG: FAISS, HuggingFace Sentence Transformers
- Audio: Groq Whisper API, Edge-TTS
- Clone the repository:
git clone https://github.com/yourusername/FinVoice.git cd FinVoice - Install dependencies:
pip install -r requirements.txt pip install edge-tts
- Setup environment variables (
.env):GROQ_API_KEY=your_groq_key
- Run the Web Application:
python main.py --mode ui
- Run automated Multilingual tests:
python test_multilingual.py
The core agent logic runs inside app/agent/nodes.py which defines 5 specific nodes:
stt_node: Ingests audio, calls Whisper API, detects language.intent_node: Uses LLM to classify if the query needs a Tool, Policy (RAG), or Human.tool_execution_node: Routes dynamically to backend Python functions.generation_node: Translates the result into the detected language using colloquial slang.tts_node: Generates Microsoft Azure Neural Voice files.