Skip to content

ashfaaqrifath/Casper-PC-Assistant

Repository files navigation

Casper

Casper

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.


✨ Features

🌐 Web & Search

  • 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

🤖 AI & APIs

  • OpenAI GPT-3 — Ask questions, get intelligent responses
  • WolframAlpha — Knowledge engine for factual queries
  • News API — Fetch latest news headlines

🖥️ System Control

  • Open and close applications
  • Shutdown, restart, and sign out of PC
  • Change desktop wallpaper
  • Clear recycle bin
  • Open Task Manager
  • Activate VPN

📋 Productivity

  • Take and save notes
  • Say the current time and date
  • Set timers
  • Play music

🔒 Privacy & Logging

  • 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

🎙️ Assistant Modes

  • 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

📁 Project Structure

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

⚙️ Requirements

Python 3.x + the following packages:

pip install pyttsx3 gtts playsound colorama SpeechRecognition

subprocess, webbrowser, and datetime are Python standard library modules.

You'll also need API keys for:


🚀 Setup

  1. Clone the repo:

    git clone https://github.com/ashfaaqrifath/Casper-PC-Assistant.git
    cd Casper-PC-Assistant
  2. Install dependencies:

    pip install pyttsx3 gtts playsound colorama SpeechRecognition
  3. Add your API keys to the relevant files:

    • openai_gpt3.py → OpenAI API key
    • newsAPI.py → NewsAPI key
    • Casper.py → WolframAlpha app ID
  4. Run Casper:

    python Casper.py

🗂️ Module Breakdown

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

🛠️ Tech Stack

  • Language: Python 3
  • Voice Input: SpeechRecognition
  • Voice Output: pyttsx3, gTTS, playsound
  • Terminal Styling: colorama
  • APIs: OpenAI GPT-3, WolframAlpha, NewsAPI

📄 License

MIT — © 2023 Ashfaaq Rifath

About

PC assistant with voice/text control, automating tasks using APIs, system commands, messaging, smart logging, and privacy-focused features.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages