We all know about Google Assistant and Cortana desktop, they recognize the voice and perform an action according to our commands. Actually it is a part of the smart home concept. Just you have to give a voice command and the system will help you to act on it. So if you want to develop such a system then this article is for you. Skyfi Labs will give you a brief overview of the project.
We all use YouTube, browsers and music frequently in our day to day life. But what if you can access then only with your voice without any physical efforts. So this is a project article on the desktop voice assistant system using python. The project is for a second or third year engineering student. The article gives a basic overview and structure of the project which will definitely help you.
Latest projects on Python
Want to develop practical skills on Python? Checkout our latest projects and start learning for free
- You can use any IDE like Anaconda, Visual Studio etc.
- So the first step is to create a function for a voice which has arguments. Also, we are using Speech API to take voice as input. There are two default voices in our computer I.e. Male and Female. So you can use either any from these. Also, check the voice function by giving some text input and it will be converted into voice.
- You can create a new function for wishing the user. Use if_else condition statement for allocating the wished output. E.g. If its time between 12 to 18 then the system will say “Good Evening”. Along with this, you can get a welcome voice also. E.g. “Welcome, What can I do for you”.
- After that, you have to install the speech recognition model and then import it
- Define a new function for taking command from a user. Also mention class for speech recognition and input type like microphone etc. Also mention pause_threshold.
- Set a query for voice recognition language. You can use Google engine to convert your voice input to the text.
- You have to install and import some other packages like pyttsx3, Wikipedia etc. Pyttsx3 helps you to convert text input to speech conversion.
- If you ask for any information then it will display the result in textual format. You can convert it very easily in the voice format as we have already defined a function in our code previously.
- Else you ask to open YouTube in the query then it will go to the YouTube address automatically. For that, you have to install a web browser package and import it.
- In the same way, you can add queries for many websites like Google, Instagram, Facebook etc.
- The next task is to play the songs. It is same as you have done before. Add a query for “play songs”. Also, add the location of songs folder so that assistant will play the song from that only.
- So the main question is that how the queries work?…. So here we are using conditional statements. If the computer hears voice command which contains word youtube then it will go to the YouTube page address, if the voice contains google command then it will go to the Google search page and so many accordingly.
- You can add so many pages and commands for your desktop assistant.
So this is the whole scenario of the project. You can improve the project in many ways. Keep learning.
Did you know
Skyfi Labs helps students learn practical skills by building real-world projects.
You can enrol with friends and receive kits at your doorstep
You can learn from experts, build working projects, showcase skills to the world and grab the best jobs.
Get started today!
Kit required to develop Desktop voice assistant project:
Technologies you will learn by working on Desktop voice assistant project:
Desktop voice assistant project