Skip to content

codewithvikas96-ui/voice-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ Voice Assistant (Python)

Problem Statement

In today’s fast-paced digital world, users want hands-free, intelligent assistants that can understand natural language and perform daily tasks efficientlyβ€”similar to Alexa, Google Assistant, or Siri.

Solution

This project builds an Advanced Voice Assistant capable of:

  • Understanding spoken language
  • Interpreting user intent using NLP
  • Performing real-world tasks autonomously
  • Integrating with third-party APIs for extended functionality

This assistant is designed as a modular, scalable system, not just a basic speech-to-text script.


A simple voice assistant built with Python that can:

  • Open applications
  • Search Wikipedia
  • Fetch weather information
  • Tell date and time
  • Perform Google searches
  • Exit gracefully with Hinglish stop messages

✨ Features

  • 🎀 Speech Recognition - Understands your voice commands using speech_recognition.
  • πŸ”Š Text-to-Speech – Speaks back responses with pyttsx3.
  • 🌦️ Weather Updates – Get real-time weather for any city.
  • πŸ“… Date & Time – Ask for today’s date or current time.
  • πŸ” Google Search – Search the web instantly.
  • πŸ“– Wikipedia Search – Fetch summaries from Wikipedia.
  • πŸ›‘ Graceful Exit – Hinglish farewell messages when you say exit/quit/stop.

System Architecture

User (Voice)
   ↓
Microphone Input
   ↓
Speech Recognition Module
   ↓
Command Router
   ↓
Task Execution Layer
   β”œβ”€β”€ Date and time
   β”œβ”€β”€ Open applications
   β”œβ”€β”€ Weather API
   β”œβ”€β”€ Wikipedia service
   β”œβ”€β”€ Google service
   ↓
Text-to-Speech Output
   ↓
User (Voice Response)


πŸ› οΈ Tech Stack

  • Python 3.9+
  • speech_recognition
  • pyttsx3
  • wikipedia
  • requests
  • webbrowser
  • os
  • platform

▢️ Usage

Run the assistant:

python app.py

Say commands like:

  • "Search for Rohit Sharma"
  • "Open Notepad"
  • "What's the weather in Mumbai?"
  • "Tell me the time"
  • "Stop"

πŸ›‘ Exit

Say "exit", "quit", or "stop" to end the assistant.
You’ll hear a friendly Hinglish goodbye like:
| "Assistant band ho raha hai, phir milte hain!"


πŸ“‚ Project Structure

voice-assistant/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py                  # Entry point
β”‚   β”œβ”€β”€ config.py               # Configuration & API keys
β”‚   β”œβ”€β”€ speech/
β”‚   β”‚   β”œβ”€β”€ recognizer.py       # Speech-to-text
β”‚   β”‚   └── speaker.py          # Text-to-speech
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ date_time.py    # For Date and Time
β”‚   β”‚   β”œβ”€β”€ open_application.py  # Opening applications and websites
β”‚   β”‚   β”œβ”€β”€ weather_ser.py # Weather API
β”‚   β”‚   └── wikipedia_ser.py        # Fetch summaries from Wikipedia
β”‚   β”œβ”€β”€ router/
β”‚       └── command_router.py   # Routes intents
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .env
└── README.md



πŸ‘¨β€πŸ’» Author

Developed with ❀️ by Vikas Ajay Vishwakarma

Feel free to fork, contribute, or suggest new features!


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages