I Built a Real JARVIS in Python with Knowledge Graphs, BERT Emotion Detection, Face Recognition and NASA API
Source: Dev.to
Introduction
Ever watched Iron Man and thought — could I actually build that? I did, and after months of work, here’s what I ended up with.
GitHub repository
Why I Built It This Way
I wanted JARVIS to remember things about me across sessions, which led me to three core architectural decisions that make this project different.
Personal Knowledge Graph (NetworkX)
import networkx as nx
pythonG = nx.DiGraph()
pythonG.add_node(
"User",
type="Person",
name="YOUR_NAME",
age="YOUR_AGE"
)
When you ask “what is my favorite movie?”, JARVIS traverses the graph to find the answer rather than looking up a hard‑coded variable. This makes it trivially easy to add new facts and relationships — just add nodes and edges.
BERT for Emotion & Intent Detection
The system uses a BERT model from HuggingFace Transformers to detect user intent and emotional tone.
Face & Gesture Recognition (OpenCV)
OpenCV handles face detection and gesture recognition, enabling more natural interaction.
What It Can Do
- 🧠 Personal Knowledge Graph — remembers your preferences, birthdays, relationships
- Voice input via Google Speech Recognition
- Voice output with
pyttsx3 - Sentiment analysis using NLTK VADER
- Space data retrieval from the NASA API
- Optional local LLM support via Ollama
Tech Stack
| Component | Technology |
|---|---|
| Language | Python 3.8+ |
| NLP / Intent | BERT (HuggingFace Transformers) |
| Sentiment | NLTK VADER |
| Knowledge Graph | NetworkX |
| Computer Vision | OpenCV |
| Voice Input | Google Speech Recognition |
| Voice Output | pyttsx3 |
| Space Data | NASA API |
| Local LLM (optional) | Ollama |
Current Limitations
- Windows‑only: Uses
os.startfileandtaskkill, which are Windows‑specific. Cross‑platform support is the next big goal.
What’s Next
- Add cross‑platform support for Linux & macOS
- Refine the Knowledge Graph architecture
Try It Out
Feedback
I’d love feedback — especially on the Knowledge Graph architecture. Is NetworkX the right choice for this use case? Would you have done it differently? Drop a comment below.