An emotional AI companion that knows when NOT to reply.
Instead of always giving advice or long answers, SilenceAI sometimes pauses, stays silent, or guides you to breathe when you're emotionally overwhelmed.
Most AI tools:
- Talk too much
- Give advice when you don't want it
- Increase mental noise
SilenceAI does the opposite.
It reduces overload by responding less, not more.
-
You type how you're feeling
Example: "I'm really stressed and exhausted." -
AI reads the emotional intensity
It analyzes if you're calm, anxious, angry, or overwhelmed -
If emotions are high β AI slows down
- No instant reply
- Shows a breathing circle or calming message
- Sometimes shows nothing for a few seconds
-
After the pause, it responds gently
Short, supportive lines like: "I'm here. No need to rush."
- β Detects emotional weight in text
- β Decides whether to respond or stay silent
- β Adjusts response length, timing, and tone
- β Learns what you find calming over time
- Glassmorphic design with smooth animations
- Animated breathing circle for calming exercises
- Gradient backgrounds and particle effects
- Responsive and modern interface
- Emotion Detection: Analyzes text for emotional intensity and sentiment
- Smart Response Types:
- π« Breathing: For very high stress (shows breathing circle)
- π€« Silence: For intense negative emotions (pause with minimal/no response)
- βΈοΈ Pause: For medium intensity (delayed gentle response)
- π¬ Normal: For low intensity (gentle supportive message)
- Breathing Exercise: 8-second guided breathing with animated circle
- Silence Period: 3-5 seconds of quiet presence
- Delayed Response: 2-3 seconds pause before gentle reply
- Gentle Messages: Short, supportive responses (never preachy)
- Node.js (v16 or higher)
- Python (v3.8 or higher)
- OpenAI API Key (optional, falls back to templates without it)
cd silenceaicd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create .env file
copy .env.example .env
# Edit .env and add your OpenAI API key (optional)cd frontend
# Install dependencies
npm installcd backend
venv\Scripts\activate # Windows
# source venv/bin/activate # Mac/Linux
python app.pyBackend will run on http://localhost:5000
cd frontend
npm run devFrontend will run on http://localhost:3000
Navigate to http://localhost:3000
silenceai/
βββ frontend/ # React + Vite frontend
β βββ src/
β β βββ components/ # UI components
β β β βββ WelcomeScreen.jsx # Initial welcome animation
β β β βββ ChatInterface.jsx # Main chat UI
β β β βββ BreathingCircle.jsx # Breathing exercise overlay
β β β βββ Message.jsx # Chat message bubble
β β β βββ TypingIndicator.jsx # Typing dots animation
β β β βββ SilenceIndicator.jsx # Silence period indicator
β β βββ App.jsx # Main app component
β β βββ main.jsx # React entry point
β β βββ index.css # Global styles
β βββ package.json
β βββ vite.config.js
β
βββ backend/ # Flask backend
β βββ app.py # Main Flask application
β βββ emotion_detector.py # Emotional analysis engine
β βββ response_generator.py # Response logic and generation
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment variables template
β
βββ README.md # This file
- Glassmorphism: Semi-transparent elements with blur effects
- Gradient Backgrounds: Calming purple-blue gradients
- Smooth Animations: Framer Motion for fluid transitions
- Minimalist: Clean, uncluttered interface
- Breathing Circle: Pulsing animation synchronized with breathing rhythm
- Delayed Responses: Intentional pauses to reduce urgency
- Gentle Language: Short, supportive messages
- Non-Intrusive: Never forces interaction
- Context Aware: Understands emotional intensity from text
- Adaptive Responses: Changes behavior based on user state
- Validation Over Advice: Acknowledges feelings without fixing
- Respectful Silence: Knows when not to respond
- Keywords: High intensity words (stressed, anxious, overwhelmed)
- Punctuation: Exclamation marks indicate intensity
- Capitalization: ALL CAPS words show emotion
- Repetition: Repeated letters (sooo, nooo)
- Stress: overwhelmed, exhausted, stressed
- Anxiety: anxious, panic, scared, worried
- Sadness: sad, depressed, lonely, crying
- Anger: angry, hate, furious, mad
- Positive: Happy, good, great, amazing
- Neutral: Normal emotional state
Intensity > 0.7 β Breathing Exercise (8s)
Intensity > 0.5 + Negative β Silence (3-5s)
Intensity 0.3-0.6 β Pause (2-3s)
Intensity < 0.3 β Normal Response (immediate)
OPENAI_API_KEY=sk-... # Optional: For AI-generated responses
FLASK_ENV=development # development or production
PORT=5000 # Backend portserver: {
port: 3000, // Frontend port
proxy: {
'/api': 'http://localhost:5000' // Backend proxy
}
}- Stress Management: Guides breathing during panic
- Emotional Processing: Validates feelings without judgment
- Mindful Reflection: Encourages pause and presence
- Anxiety Relief: Reduces overwhelm through silence
- Digital Detox: Less is more approach to AI interaction
SilenceAI is an emotional AI that supports users by choosing silence, pauses, or minimal guidance when talking would do more harm than good.
- React 18.2 - UI framework
- Vite - Build tool and dev server
- Framer Motion - Animation library
- Axios - HTTP client
- Flask - Python web framework
- TextBlob - Sentiment analysis
- OpenAI API - GPT-3.5 for contextual responses (optional)
- python-dotenv - Environment management
Send a message and receive an intelligent response
Request:
{
"message": "I'm feeling really stressed",
"conversation_history": []
}Response:
{
"response_type": "breathing",
"message": null,
"pause_duration": 8000,
"breathing_message": "Let's take a moment together."
}Response Types:
breathing- Shows breathing circlesilence- Shows silence indicatorpause- Delayed responsenormal- Immediate gentle response
Check backend health status
Edit gradients in frontend/src/index.css:
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);Edit durations in frontend/src/App.jsx:
setTimeout(() => {
setShowBreathing(false);
}, 8000); // Breathing durationEdit templates in backend/response_generator.py:
self.gentle_responses = {
'stress': ["I'm here.", "Take your time."],
# Add your custom responses
}Contributions are welcome! This is a hackathon project focused on mindful AI interaction.
- Voice input/output
- User preference learning
- Multiple breathing patterns
- Journal integration
- Mobile app version
- Offline mode
- Custom themes
This project is created for educational and hackathon purposes.
Built with the philosophy that sometimes the best response is silence.
Inspired by mindfulness practices and the understanding that AI doesn't always need to have the last word.
For questions or feedback about SilenceAI, feel free to reach out!
Remember: You don't always need an answer. Sometimes you just need to be heard. π