If you're thinking that this is just an ordinary tutorial, you're in for a surprise. This is not just a simple assistant it's much more than that.
We're going to go beyond just programming and show you how to integrate your assistant with electronics and automation. This project is perfect for exploring the development and learning about different concepts, such as automation and artificial intelligence.If you take a look around, you'll see that all technologies are based on both programming and electronics. In this project, we're going to show you how you can create and integrate these different domains of concepts to make something truly amazing.
Not only will you learn how to code and work with electronics, but you'll also get hands-on experience integrating them into a single project. This is a great opportunity to explore the intersection of programming and electronics and see how they can work together to create something awe-inspiring.
So join us on this journey as we show you how to make and learn about advanced AI assistants that can do just about anything. This is a chance to push the limits of your knowledge and skills, and we can't wait to see what you'll create.This series is not just a tutorial it's an opportunity to experiment and push the limits of what's possible. So if you're ready to take your skills to the next level and create an assistant that can do just about anything, then this series is for you.
Are you ready to join us on this journey! Let's get started!
#REQUIRMENTS TO MAKE VOICE ASSISTANT
- A computer with Python installed. You can download Python from the official website and install it on your computer.
- A text editor or integrated development environment (IDE) to write your Python code. Some popular IDEs for Python include PyCharm, Visual Studio Code, and IDLE (which comes bundled with Python).
- The necessary libraries and modules to build your assistant. Depending on the functionality you want to implement, you may need to install additional libraries and modules. For example, if you want to build a voice-based assistant, you may need to install the SpeechRecognition library.
- Knowledge of Python programming. You will need to be familiar with the basic syntax and concepts of Python in order to write the code for your assistant. If you are new to Python, it is recommended to start with some basic tutorials and work your way up to more advanced topics.
- A clear idea of the functionality you want to implement in your assistant. Defining the goals and capabilities of your assistant will help guide the development process and ensure that you have a functional and useful end product.
#Explanation
#Imports
- import datetime
- import pyttsx3 # pip install pyttsx3
- import speech_recognition as sr # pip install SpeechRecognition
- engine = pyttsx3.init() # initialise pyttsx3
- voices = engine.getProperty('voices')
- engine.setProperty('voice', voices[1].id) # 0-2 range for different voices
- voicespeed = 140 # setting speed
- engine.setProperty('rate', voicespeed)
#Speak function
- def speak(audio):
- engine.say(audio)
- engine.runAndWait()
#takeCommand function
- def takeCommand():
- """Listen for a command from the user and return it as text."""
- r = sr.Recognizer()
- with sr.Microphone() as source:
- print("Listening...")
- r.pause_threshold = 1
- audio = r.listen(source)
- try:
- print("Recognising...")
- query = r.recognize_google(audio, language='en-us')
- except Exception as e:
- print()
- return "---"
- return query
# Time function
- def time():
- """Speak the current time."""
- time = datetime.datetime.now().strftime("%H:%M:%S")
- speak(time)
- print(time)
# Wish me function
- def wishme():
- speak("welcome back sir")
- hour = datetime.datetime.now().hour
- if hour>=6 and hour<=12:
- speak('Good morning')
- elif hour>=12 and hour<=18:
- speak('Good afternoon')
- elif hour>=18 and hour<=24:
- speak('Good evening')
- else:
- speak('good night')
- speak('How can i help you today')
Finally, the function prints out a question asking how it can help the user.
Overall, this function seems to be designed to provide a personalized greeting to the user and initiate a conversation.
# Main loop of the script
- if __name__ == "__main__":
- while True:
- query = takeCommand().lower()
- print(query)
- if "good morning" in query:
- speak("good morning sir")
- elif "time" in query:
- time()
# Error You may Face!
#1 Solution!
- pip install pipwin
- pipwin install pyaudio
GUI part how to do it gaurav bro
Good man
great job
hello bro please help me to make a Jarvis when entered all command and run then in terminal shows me syntax error please solve my problem
I am not entering any wrong code then. please help bro.
vanshraghav390@gmail.com that's my Gmail account so pls help me
This comment has been removed by the author.
Hey bro, i have the same problem that this guy has, except in my case, the code runs but the wishme command somehow doesn't work, In the terminal, i saw that only 'listening...' was displayed and it was stuck there, nothing after that, i kept saying tell me the time =, but it didn't work.
vaibhavsehajpal@gmai.com . This is my email bro, please help.
Thankyou
Fantastish!
Bro i code this and i download every modules you said but my program didn't work.
even i have 0 problem what should i do ?
to help me here is my email : rouzjuju13@gmail.com