DEV Community

Areej Safeer
Areej Safeer

Posted on

I Built a Voice-Controlled PC with Python - Control Your Computer Hands-Free

Introduction: Imagine controlling your entire computer just by speaking commands. No mouse, no keyboard - just your voice. I built a Python application that lets you open apps, click, type, and control your PC completely hands-free. Here's how I did it and what I learned along the way.

What Does It Do? This voice-controlled PC system uses Python to execute commands based on text input (with plans for real voice recognition). You can open applications, control your mouse, type text, manage windows, and perform keyboard shortcuts - all through simple spoken commands.

Technologies Used:

Python 3.x
PyAutoGUI (for mouse and keyboard control)
pyttsx3 (for text-to-speech feedback)
SpeechRecognition (planned for voice input)
Key Features: Open any application by name Mouse control (click, double-click, right-click)

  • Type text automatically
  • Keyboard shortcuts (copy, paste, save, undo)
  • Window management (close, minimize, maximize)
  • Scroll control
  • Web search automation
  • Screenshot
  • capture
  • Voice feedback - PC talks back to you!

Available Commands:

"open chrome" - Opens Chrome browser
"click" - Clicks at current position
"type hello world" - Types text
"copy" / "paste" - Clipboard operations
"scroll down" / "scroll up" - Page scrolling
"close" - Closes active window
"search python tutorial" - Opens browser and searches
"screenshot" - Takes a screenshot
"help" - Shows all commands
How It Works:

User speaks/types a command
Command is converted to lowercase and parsed
PyAutoGUI executes the corresponding action
pyttsx3 provides voice confirmation
System waits for next command

GitHub:https://github.com/areeejabbasii/python_lib.git

Top comments (0)