Skip to content

AdwaitPatel/NirdeshakAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

An intelligent multilingual assistant designed to help users understand and access Indian government services easily. Built with FastAPI backend and React frontend with voice capabilities.

Features

  • Multilingual support for Indian regional languages, Hindi, and English
  • Voice input/output using speech recognition and text-to-speech
  • Clean, responsive UI with real-time chat interface
  • Markdown formatting for structured responses
  • Direct links to official government websites

Prerequisites

  • Python 3.8 or higher
  • Node.js 16 or higher
  • npm or yarn package manager

Environment Setup

Create a .env file in the server directory with the following variables:

AZURE_OPENAI_API_KEY=your_azure_openai_api_key
AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint
SARVAM_API_KEY=your_sarvam_api_key

Installation & Setup

Backend (FastAPI)

  1. Navigate to the server directory:
cd server
  1. Create and activate a virtual environment:
python -m venv myenv
source myenv/bin/activate  # On Windows: myenv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Start the FastAPI server:
uvicorn main:app --reload --port 8000

The backend will be available at http://localhost:8000

Frontend (React)

  1. Navigate to the client directory:
cd client
  1. Install dependencies:
npm install
  1. Update API configuration (if using local backend):

    • Open src/api.jsx
    • Change BASE_URL to "http://localhost:8000"
  2. Start the development server:

npm run dev

The frontend will be available at http://localhost:5173

Production Build

Frontend

cd client
npm run build

Backend

cd server
uvicorn main:app --host 0.0.0.0 --port 8000

API Endpoints

  • POST /query - Submit user queries and get AI responses
  • POST /transcribe - Convert audio to text
  • POST /tts - Convert text to speech
  • GET /docs - API documentation (FastAPI auto-generated)

Technology Stack

  • Backend: FastAPI, Python, Uvicorn, Azure OpenAI, SarvamAI
  • Frontend: React, Vite, TailwindCSS, Framer Motion
  • Speech: Web Speech API, SarvamAI Speech Services

Development

The application supports hot reloading in development mode. Make changes to the code and see them reflected immediately.

License

This project is developed for hackathon submission.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •