How harshpratapsinghhh/myra works
MYRA is a voice-and-text personal assistant. Its main loop checks for proactive idle behavior, waits for wake-word activation, listens for a command, and passes it to the brain for intent-based actions or conversational handling; responses are spoken back. Music playback and controls are a prominent action branch, with short- and long-term state supporting context, recommendations, and behavior-aware suggestions. The README also documents mood-aware personality and hybrid rule/LLM conversation. Some brain internals and integrations were not sampled, so only documented or indexed relationships are shown.
Main entry points: brain.py Command brain · proactive_engine.py Proactive layer · main.py Voice loop · memory_engine.py Memory engine
Components 26
Interaction
- Voice loop
main.py - Text mode
run.py - Wake detection
input/wake_word.py - Voice listener
input/voice_listener.py
Assistant reasoning
- Command brain
core/brain.py - Intent detection
core/intent_engine.py - Conversation
core/conversation_engine.py - AI brain
core/ai_brain.py - Personality
core/personality_engine.py - Mood suggestions
core/suggestion_engine.py - Proactive layer
core/proactive_engine.py - Confidence decisions
core/decision_engine.py - Prediction
core/prediction_engine.py - Recommendations
core/recommendation_engine.py - User profile
core/profile_engine.py
Actions
- Music controls
actions/music_actions.py - Music player
actions/music_player.py - System actions
actions/system_actions.py - Web actions
actions/web_actions.py
Memory and state
- Memory engine
core/memory_engine.py - Session memory
data/memory.json - Long-term history
data/history.json
Response delivery
- Speech output
output/speaker.py - Voice generation
output/voice_engine.py
Other components
- User
- OpenAI service
Connections 35
- User → Voice loop: speaks commands
README.md - Voice loop → Wake detection: waits for wake
main.py - Wake detection → Voice listener: activates listening
input/wake_word.py - Voice loop → Voice listener: captures input
main.py - Voice loop → Command brain: processes command
main.py - Voice loop → Proactive layer: checks idle
main.py - Voice loop → Prediction: checks prediction
main.py - Voice loop → Text mode: falls back
main.py - Text mode → Command brain: processes command
run.py - Text mode → Proactive layer: checks idle
run.py - Command brain → Intent detection: detects intent
core/brain.py - Command brain → Conversation: handles conversation
core/brain.py - Command brain → AI brain: requests AI reply
core/brain.py - AI brain → OpenAI service: requests dialogue
README.md - Command brain → Music controls: dispatches music
core/brain.py - Command brain → System actions: dispatches app action
core/brain.py - Command brain → Web actions: dispatches search
core/brain.py - Music controls → Music player: delegates playback
actions/music_actions.py - Music player → Memory engine: updates playback state
actions/music_player.py - Command brain → Memory engine: reads and updates context
core/brain.py - Memory engine → Session memory: reads and writes
core/memory_engine.py - Memory engine → Long-term history: reads and writes
core/memory_engine.py - Command brain → Mood suggestions: detects mood
core/brain.py - Proactive layer → Recommendations: gets recommendation
core/proactive_engine.py - Proactive layer → Confidence decisions: scores confidence
core/proactive_engine.py - Proactive layer → Mood suggestions: sets pending action
core/proactive_engine.py - Proactive layer → Music controls: starts music
core/proactive_engine.py - Proactive layer → Memory engine: reads activity and mood
core/proactive_engine.py - Personality → User: adapts response tone
- Command brain → Personality: formats action response
core/brain.py - Conversation → Memory engine: uses conversation memory
core/conversation_engine.py - Command brain → Speech output: speaks response
core/brain.py - Proactive layer → Speech output: speaks prompt
core/proactive_engine.py - Speech output → Voice generation: generates audio
output/speaker.py - Voice generation → User: returns speech