A Python-based desktop assistant with voice and text control — automate tasks, search the web, control your PC, query AI APIs, manage notes, and more. Built with speech recognition and TTS for a fully hands-free experience.
- Search Google, YouTube, Wikipedia, and Google News
- Search for locations on maps
- Open Chrome tabs and incognito tabs
- Access Gmail, Facebook, Instagram, Twitter, and GitHub
- OpenAI GPT-3 — Ask questions, get intelligent responses
- WolframAlpha — Knowledge engine for factual queries
- News API — Fetch latest news headlines
- Open and close applications
- Shutdown, restart, and sign out of PC
- Change desktop wallpaper
- Clear recycle bin
- Open Task Manager
- Activate VPN
- Take and save notes
- Say the current time and date
- Set timers
- Play music
- Chronicle Engine — Smart activity logging
- Stealth Mode — Disable activity logging on demand
- Clean Slate Protocol — Delete all activity logs
- Chronicle Audio Mode — Record audio sessions
- Sentry Mode — Password-lock the assistant
- Voice input mode — Fully hands-free via microphone
- Text input mode — Type commands instead of speaking
- Stand-By Mode — Low-activity listening state
- Time-aware greetings (morning / afternoon / evening)
- Switchable assistant voice
- Hard-coded smart responses for common phrases
Casper-PC-Assistant/
├── Casper.py # Main entry point — command processing & core logic
├── speech_engine.py # TTS engine — speaks responses aloud
├── input_engine.py # Voice recognition — listens for commands
├── system_functions.py # PC control: shutdown, apps, wallpaper, etc.
├── web_functions.py # Web search, browser, social media
├── program_functions.py # App open/close logic
├── message_functions.py # Notes, messaging, reminders
├── chronicle_engine.py # Activity logging system
├── newsAPI.py # News API integration
├── openai_gpt3.py # OpenAI GPT-3 integration
├── casper.gif # Casper logo animation
├── casper_title.png # Title image
├── CasperIntro.gif # Intro animation
└── LICENSE.md
Python 3.x + the following packages:
pip install pyttsx3 gtts playsound colorama SpeechRecognition
subprocess,webbrowser, anddatetimeare Python standard library modules.
You'll also need API keys for:
- OpenAI (GPT-3) → platform.openai.com
- WolframAlpha → developer.wolframalpha.com
- NewsAPI → newsapi.org
-
Clone the repo:
git clone https://github.com/ashfaaqrifath/Casper-PC-Assistant.git cd Casper-PC-Assistant -
Install dependencies:
pip install pyttsx3 gtts playsound colorama SpeechRecognition
-
Add your API keys to the relevant files:
openai_gpt3.py→ OpenAI API keynewsAPI.py→ NewsAPI keyCasper.py→ WolframAlpha app ID
-
Run Casper:
python Casper.py
| File | Role |
|---|---|
Casper.py |
Core brain — command routing and response logic |
speech_engine.py |
Text-to-speech output |
input_engine.py |
Speech recognition input |
system_functions.py |
PC system commands |
web_functions.py |
Browser and web search |
program_functions.py |
Application launcher/closer |
message_functions.py |
Notes and messaging |
chronicle_engine.py |
Logging, Stealth Mode, Clean Slate |
newsAPI.py |
News fetching via NewsAPI |
openai_gpt3.py |
GPT-3 query handler |
- Language: Python 3
- Voice Input:
SpeechRecognition - Voice Output:
pyttsx3,gTTS,playsound - Terminal Styling:
colorama - APIs: OpenAI GPT-3, WolframAlpha, NewsAPI
MIT — © 2023 Ashfaaq Rifath

