Virtual Assistant on Microprocessor .
Have you wondering how Artificial Intelligence like Siri , Google Assistant or Alexa works ? Or maybe you want to created your Virtual Assistant on IoT ?How about we start making one , and we’ll cover it up about basic AI decision
Requirements :
- Raspberry pi
- onboard microphone
- Python 3
A Brief Summary
First , Raspberry Pi is a powered Microprocessor with a clock speed between 700MHz — 1.5 GHz and a RAM between 1–8 GB . Also it has an onboard Wireless LAN Adapter 802.11n and another essential kit like , micro SD for storage , microphone even a camera .
It can be used as a research thing or an IoT .
Raspberry Pi is running on Linux operating system .
As a beginner like me , I recommend the Raspberry Pi because it doesn’t require any setup or any parts that quite comprehensive as a Microprocessor and a plus it run on Linux , any operates can be configured using terminal and fetch .
It’s just like a mini computer that can fit onto your pocket .
Anyway , Shall we go for an experiment ?
STEP -1 : Prerequisite
STEP -2 : Analyze
STEP -3 : Identification
STEP -4 : Implementation
STEP -5 : Test it !
Objective
The Objective is to created an Artificial Intelligence that run on Microprocessor .
There are a major branches of Artificial Intelligence like Neural Network , Machine Learning , Natural Language Processing and so on …
But purposing for this research we’ll go for the basic AI using multiple conditional statement and integrated it into Raspberry Pi .
STEP — 1 : Prerequisite
It requires Python on our system and an IDE / Text Editor for experiment the code.
But if Python is already pre-installed on your system you can go skip to the next section ,
First , check the version by opening terminal , CTRL + alt + T
$ python –version
or
$ python3 –version
1. Open up your terminal by pressing Ctrl + Alt + T.
2. Update your local system’s repository list by entering the following command: sudo apt-get update.
3. Download the latest version of Python: sudo apt-get install python.
4. Apt will automatically find the package and install it on your computer.
Installing Text Editor
Let’s choose our favorite code editor , Visual Studio Code
$ sudo apt update$ sudo apt install code
STEP 2 — Analyze
AI stands for artificial intelligence refers to systems or machines that mimic human intelligence to perform tasks and can iteratively improve themselves based on the information they collect.
Meaning it’s behavior is on machines , as opposed to the natural intelligence .
Also AI can be designed to make a decisions using a real time interaction .
Can you imagine what does an Artificial Intelligence do their things ?
So everything that contain a things like an input and an answering as decision it based on queries should do the trick .
Now we wanted to make a Virtual Assistant based on Basic Artificial Intelligence .
But first what we need is to know our programming language , Python .
Python has a wide fundamental algorithm , a variety pre-designed libraries and support an IoT for Microprocessor . So it can be flexible .
Further we’ll identification about how it works
STEP -3 : Identification
After we analyze the Goals and it should be clear
So the flow chart may be like this
At Least it wrapped on three stages :
The input
- The Process input will be triggered by Microphone using User Voice , when a word is approach then the query on words is loaded
- The query words can contain a multiple statement for a certain time in second
- The query will convert a word into a command ,
The Command
- If the command matched it will be executed ,
- Otherwise it back to speech input
The Output
- The Command will be opening target application or answering question based on their adjective and objective behaviour
- Some corresponding application may access an internet using a fetch over HTTPS to
- and the last for an output is , if user say “exit” the program will be terminated .
STEP -4 : Implementation
In order to run we need some several dependencies ,
- gTTS a Google Text to Speech based on Google Translate
- speech recognition to recognize the voice
- RPi .GPIO as a platform setup for Raspberry Pi
This is an example pseudocode how gTTS works
and below are the code of main.py
Conclusion
It may a one liner , but somehow it quite powerful enough to get a basic Artificial Intelligence based on multiple condition and integrated it into Microprocessor .
Citation
Beginning of Artificial Intelligence : https://link.springer.com/content/pdf/10.1007/978-1-4842-2743-5.pdf
Short Research on Voice Control System Based on Artificial Intelligence Assistant : https://ieeexplore.ieee.org/abstract/document/9051160
Repository: https://github.com/RFebrians/AI-Assistant/tree/main/IoT
Code Implementation Example : https://github.com/MichalKacprzak99/jarvis
Python Jarvis Tutorial : https://www.youtube.com/watch?v=0sjRkz1UIDQ&ab_channel=edureka%21