How to Build SIRI – Your Own Python Voice Assistant – Beginner

Turn your voice into power using Python 🐍. Let’s build your own assistant like Siri, called GIRI, from scratch – in Telugu style!

GIT REPO LINK :- LINK

READ THIS :- POST

👋 Introduction

Hello coders!
In this blog post, we’re going to build a super cool Python project called GIRI – Your Personal Voice Assistant.

It can:

✅ Listen to your voice
✅ Understand what you said
✅ Open Chrome or VS Code
✅ Play songs on YouTube
✅ Tell jokes
✅ Give you the current time
✅ Tell who someone is using Wikipedia
✅ And most importantly… it talks about you!

Sounds cool? Let’s get started 👇


🛠️ Tools Required

  • Python 3.8 or above
  • VS Code (or any editor)
  • A microphone
  • Internet connection for YouTube/Wikipedia

Step 1: Create Project Folder

Open VS Code → Create a new folder:

mkdir voice-desktop-assistant
cd voice-desktop-assistant

🧪 Step 2: Set Up a Virtual Environment

Run this to create a virtual environment:

python -m venv venv

Activate it:

  • Windows:
venv\Scripts\activate
  • Mac/Linux:
source venv/bin/activate

You’ll see (venv) in your terminal – that means you’re good to go!

Step 3: Install Required Libraries

Run this to install all dependencies:

pip install SpeechRecognition pyttsx3 pywhatkit wikipedia pyjokes

Libraries Explained

ModuleDescription
speech_recognitionConverts voice to text
pyttsx3Converts text to speech (works offline)
pywhatkitUsed to play YouTube videos via voice
wikipediaFetches summary of people or topics
pyjokesTells random programming jokes
os / sysTo open apps or exit the assistant

Step 4: Create the Assistant Script

Create a file assistant.py and paste this full code:

import speech_recognition as sr
import pyttsx3
import pywhatkit
import datetime
import wikipedia
import pyjokes
import os
import sys

# Initialize speech engine
engine = pyttsx3.init()
engine.setProperty('rate', 170)
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)  # Use female voice

def talk(text):
    print("🎙️ GIRI:", text)
    engine.say(text)
    engine.runAndWait() 

def take_command():
    listener = sr.Recognizer()
    with sr.Microphone() as source:
        print("🎧 Listening...")    
        listener.adjust_for_ambient_noise(source)
        voice = listener.listen(source)
    try:
        command = listener.recognize_google(voice)
        command = command.lower()
        print("🗣️ You said:", command)
    except sr.UnknownValueError:
        talk("Sorry bro, I didn’t catch that.")
        return ""
    except sr.RequestError:
        talk("Network issue with Google service.")
        return ""
    return command

def run_giri():
    command = take_command()

    if "play" in command:
        song = command.replace("play", "")
        talk("Playing on YouTube 🎶")
        pywhatkit.playonyt(song)

    elif "what's the time" in command:
        time = datetime.datetime.now().strftime('%I:%M %p')
        talk(f"It’s {time} ⏰")

    elif "who is uday codes" in command or "who is uday_codes" in command:
        info = (
            "Uday, known as uday_codes on Instagram, is a coding content creator. "
            "He teaches Python projects in Telugu and runs udaycodes.in 💻"
        )
        talk(info)

    elif "who is" in command:
        person = command.replace("who is", "").strip()
        try:
            info = wikipedia.summary(person, sentences=1)
            talk(info)
        except:
            talk("Sorry, I couldn’t find information about that person.")

    elif "joke" in command:
        talk(pyjokes.get_joke())

    elif "open chrome" in command:
        chrome_path = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
        if os.path.exists(chrome_path):
            talk("Opening Chrome 🚀")
            os.startfile(chrome_path)
        else:
            talk("Chrome path not found 😬")

    elif "open code" in command or "open vs code" in command:
        talk("Opening VS Code 💻")
        os.system("code")

    elif "exit" in command or "stop" in command:
        talk("Okay bro, see you later 👋")
        sys.exit()

    elif command != "":
        talk("I heard you, but I don’t understand that yet 😅")

talk("Yo! I'm GIRI – your personal voice assistant 💡")
while True:
    run_giri()

How to Run the Project

After you activate the venv, run:

python assistant.py

Then say:

  • "play nani songs"
  • "what's the time"
  • "open chrome"
  • "who is Elon Musk"
  • "who is uday codes"

And GIRI will respond like a pro! 🤖

Final Words

That’s it – your own voice assistant like Siri is ready!
If you found this helpful, make sure to:

  • Share this post with your coding gang
  • Tag U_day_Codes when you post it
  • Comment your thoughts below 💬

Keep coding. Keep inspiring. Jai Python 💻🔥

17 thoughts on “How to Build SIRI – Your Own Python Voice Assistant – Beginner”

  1. Bro , good evening I am btech 2nd year student jst saw your reel in Instagram about this project so I commented and got this link from u . Now, i have a question please answer it .. My question is ” can we add this project in our resume ? and I have doubt that interviewer may think of like , this is a simple project ? ” .
    Please answer bro

    Reply
    • Hey bro! First of all, thank you for checking out the reel and visiting the blog — I really appreciate it!
      Yes, you can definitely add this project to your resume.
      Even though it looks simple on the surface, it shows that:
      You understand voice recognition and AI basics
      You can integrate multiple Python libraries
      You can build a working assistant that interacts with the system (open apps, fetch info, etc.)

      Here’s the smart part: What really matters is how you present it.
      If you explain it well — like how you handled speech-to-text, used APIs, and designed user-friendly features — even a small project can make a big impact in interviews.
      Also, use it as a base. You can keep adding features like:
      Dynamic website & app launching
      Note-taking using voice
      Email sender via voice
      GUI interface using Tkinter or PyQt

      So yes, it’s a cool project for a 2nd-year B.Tech student and a great starting point. Just keep improving and building — that’s how you stand out!

      Reply
  2. Hi bro,Good afternoon I reached out here by the link which you sent me on instagram,I have a doubt that how can we change the voice assistant name instead of using GIRI?… please give me reply bro

    Reply
    • Hey bro! 👋 thanks for checking out the project!
      Yes, you can easily change the assistant name from “GIRI” to anything you like — for example “AVA”, “RAJU”, “JARVIS”, or even your own name.

      Here’s how to do it:

      Open the assistant.py file in VS Code.

      Wherever you see the word GIRI (in print statements, talk() function, or intro messages), just replace it with your preferred name.

      Save the file and run it again — now your assistant will speak with the new name!

      Reply
  3. (venv) PS C:\Users\User\Desktop\neon> python assistant.py
    🎙️ NEON: Yo! I’m NEON – your personal voice assistant 💡
    Traceback (most recent call last):
    File “C:\Users\User\Desktop\neon\venv\lib\site-packages\speech_recognition\__init__.py”, line 120, in get_pyaudio
    import pyaudio
    ModuleNotFoundError: No module named ‘pyaudio’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “assistant.py”, line 112, in
    run_neon()
    File “assistant.py”, line 40, in run_neon
    command = take_command()
    File “assistant.py”, line 23, in take_command
    with sr.Microphone() as source:
    File “C:\Users\User\Desktop\neon\venv\lib\site-packages\speech_recognition\__init__.py”, line 92, in __init__
    self.pyaudio_module = self.get_pyaudio()
    File “C:\Users\User\Desktop\neon\venv\lib\site-packages\speech_recognition\__init__.py”, line 122, in get_pyaudio
    raise AttributeError(“Could not find PyAudio; check installation”)
    AttributeError: Could not find PyAudio; check installation

    Reply
  4. (venv) PS C:\Users\tella\OneDrive\Desktop\voice-assistant> pipwin install pyaudio
    Building cache. Hang on . . .
    Traceback (most recent call last):
    File “C:\Users\tella\AppData\Local\Programs\Python\Python310\lib\runpy.py”, line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File “C:\Users\tella\AppData\Local\Programs\Python\Python310\lib\runpy.py”, line 86, in _run_code
    exec(code, run_globals)
    File “C:\Users\tella\OneDrive\Desktop\voice-assistant\venv\Scripts\pipwin.exe\__main__.py”, line 7, in
    File “C:\Users\tella\OneDrive\Desktop\voice-assistant\venv\lib\site-packages\pipwin\command.py”, line 84, in main
    cache = pipwin.PipwinCache()
    File “C:\Users\tella\OneDrive\Desktop\voice-assistant\venv\lib\site-packages\pipwin\pipwin.py”, line 210, in __init__
    self.data = build_cache()
    File “C:\Users\tella\OneDrive\Desktop\voice-assistant\venv\lib\site-packages\pipwin\pipwin.py”, line 103, in build_cache
    dl_function = re.search(r”function dl.*\}”, soup.find(“script”).string).group(0)
    AttributeError: ‘NoneType’ object has no attribute ‘group’

    Reply
    • Hey bro! I totally get you — installing PyAudio can be tricky sometimes, especially for beginners. Here’s the simplest and beginner-friendly solution that works 100%:

      Just use Python 3.10, because PyAudio doesn’t support the latest versions like 3.11 or 3.12 properly.

      Steps to Fix It Easily:
      Uninstall current Python (if you’re using 3.11 or 3.12).

      Download Python 3.10 from
      here 👉 https://www.python.org/downloads/release/python-3100/

      While installing:

      ✅ Tick “Add Python to PATH”

      ✅ Choose “Customize Installation” → make sure ‘pip’ is checked.

      After it’s installed, open terminal and run:

      pip install pyaudio

      Boom! PyAudio will install without any errors, and your voice assistant will start working smoothly.

      Let me know if you face any issue — I got you covered! 💻🔥

      Reply
  5. Hi bro, from your response for my comment in your reel i had reached this page now thanks for it.
    That speech_recognition,pywhatkit, wikipedia,pyjokes, like this all we have to install in vs code bro

    Reply

Leave a Comment