harika-konathala /
Multilingual-Bhagavad-Gita-AI-Assistant-
Bhagavad Gita AI Assistant with semantic verse search, multilingual translation, and voice responses using Python, FAISS, and Streamlit.
Loading repository data…
divyanshujethi / repository
GITA Python Voice Assistant is an open-source, offline-first voice assistant built with Python for Fedora Linux. It uses speech recognition and text-to-speech technologies to enable hands-free interaction with your system while prioritizing privacy and lightweight performance.
A Python-based voice assistant that runs entirely on your local machine. GITA supports both text and voice input modes, intent classification, and an extensible command system — no cloud, no API keys.
GITA is a modular, offline-first voice assistant built with Python. It listens for your commands via microphone (or console input), classifies intent using regex patterns, dispatches to registered commands, and speaks responses back to you.
code/
├── main.py # Entry point — CLI argument parsing and mode selection
├── assistant.py # VoiceAssistant: orchestration, intent handling, command dispatch
├── speech.py # STT/TTS engines (SpeechRecognition, pyttsx3, console fallbacks)
├── intents.py # IntentClassifier — regex-based greeting/farewell/thanks detection
├── commands/
│ ├── base.py # Command, CommandResult, CommandRegistry ABCs
│ ├── help_command.py # Lists available commands
│ ├── time_command.py # Reports current date and time
│ └── exit_command.py # Gracefully shuts down the assistant
├── tests/
│ └── test_assistant.py
└── requirements.txt
| Feature | Description |
|---|---|
| Text mode | Typed input, console output — no audio hardware needed |
| Voice mode | Microphone input, spoken output — requires audio stack |
| Intent classification | Detects greetings, farewells, and thanks via regex |
| Command registry | Extensible plugin-like system for adding new commands |
| Built-in commands | time, help, exit |
| 100% local | No cloud dependencies, no data leaves your machine |
| Graceful fallbacks | Works even when audio libraries are missing |
pyaudio in voice mode)sudo dnf install -y python3 python3-pip python3-devel portaudio-devel pulseaudio-libs-devel
Verify the installation:
python3 --version # Expected: Python 3.10 or later
pip3 --version # Expected: pip 23.x or later
git clone <repository-url>
cd voice-assistant-python
python3 -m venv venv
source venv/bin/activate
Your prompt will change to show (venv).
pip install --upgrade pip
pip install -r code/requirements.txt
Expected output:
Successfully installed SpeechRecognition-3.10.0 pyttsx3-2.90 pyaudio-0.2.11 ...
pip install pytest
No audio hardware required. Type commands, see responses on screen.
cd code
python main.py
Example session:
Assistant: GITA ready. How can I help you?
You: hello
Assistant: Hello! How can I help you?
You: what time is it
Assistant: The current date and time is Monday, June 01, 2026 at 02:30 PM.
You: help
Assistant: Available commands:
time - Tell the current date and time
help - List all available commands
exit - Exit the voice assistant
You: exit
Assistant: Goodbye!
Requires a working microphone and speakers/headphones.
cd code
python main.py --mode voice
GITA will listen through your microphone and respond through speakers. Speak naturally — the assistant recognizes greetings, time queries, and exit commands.
Enable debug output to see what is happening under the hood:
python main.py --verbose
# or
python main.py --mode voice --verbose
cd code
pytest tests/ -v
Expected output:
tests/test_assistant.py ............. [100%]
| Argument | Default | Description |
|---|---|---|
--mode | text | Input mode: voice or text |
--verbose / -v | false | Enable debug-level logging |
Create a new file in code/commands/ and subclass Command:
from commands.base import Command, CommandResult
class WeatherCommand(Command):
name = "weather"
description = "Get the current weather"
keywords = ["weather", "forecast", "temperature"]
def can_handle(self, text: str) -> float:
return 1.0 if any(kw in text.lower() for kw in self.keywords) else 0.0
def execute(self, text: str) -> CommandResult:
return CommandResult(success=True, message="The weather is sunny and 72°F.")
Then register it in main.py:
from commands import WeatherCommand
assistant.register_command(WeatherCommand())
Edit code/intents.py to add or modify intent patterns. The classifier uses regex:
GREETING_PATTERNS = [
re.compile(r"\b(hello|hi|hey|good morning|good afternoon|good evening)\b", re.IGNORECASE),
]
pip install fails on building pyaudioProblem: PortAudio development headers are missing.
Solution:
sudo dnf install -y portaudio-devel pulseaudio-libs-devel
pip install --force-reinstall pyaudio
Problem: Required audio libraries are not installed.
Solution:
pip install SpeechRecognition pyttsx3 pyaudio
Problem: SpeechRecognition cannot find a microphone.
Solution — list available microphones:
python3 -c "import speech_recognition as sr; print(sr.Microphone.list_microphone_names())"
If the list is empty, ensure PulseAudio is running:
pulseaudio --start
No module named 'commands'Problem: The script is not being run from the code/ directory.
Solution:
cd code
python main.py
Problem: The system blocks microphone access.
Solution — install and configure ALSA/PulseAudio:
sudo dnf install -y pulseaudio-utils alsa-utils
pulseaudio --start
Grant microphone access in Fedora's privacy settings if using a desktop environment.
Problem: pytest cannot find project modules.
Solution:
cd code
pip install -e .
pytest tests/ -v
Selected from shared topics, language and repository description—not editorial ratings.
harika-konathala /
Bhagavad Gita AI Assistant with semantic verse search, multilingual translation, and voice responses using Python, FAISS, and Streamlit.
Shreyas850 /
Neel Madhav AI 🦚: A privacy-first voice assistant running 100% locally on your GPU. Blends spiritual wisdom (Gita/Mantras) with desktop automation using Phi-3, Llama.cpp, and ElevenLabs for hyper-realistic responses.