Voice Recognition Raspberry PI and Arduino UART communication

  Рет қаралды 42,584

Electronoobs

Electronoobs

Күн бұрын

High quality PCB prototypes: www.pcbway.com
3D & CNC service: www.pcbway.com/rapid-prototyp...
🔥Recognise voice with Raspberry Pi and send the text via UART port to the Arduino. Perfect voice recognition. Fast and reliable. Detect multiple voices and long phrases. Perfect for robotics.
🔀LINKS
-------------------------------------
Tutorial Website: electronoobs.com/eng_arduino_...
My tools: electronoobs.com/eng_afiliate...
Occupy Mars T-Shirt: electronoobs-merch.creator-sp...
🤝SUPPORT
-------------------------------------
Join my Arduino Course (Spanish): bit.ly/2JY8icE
ELECTRONOOBS.io: electronoobs.io
Donate on PayPal: www.paypal.com/donate?hosted_...
Help my projects on Patreon : / electronoobs
my Q&A page: electronoobs.io/forum/index.php
Facebook page: / electronoobs
Canal en Español: / electronoobs en español
00:00 Intro
02:44 Why is better?
04:04 Install Pi OS
05:16 Sound card and microphone
06:12 Install packages
07:30 Speech Code
09:06 UART communication
12:17 Pi - Arduino Test
14:49 Thank you!
Like share and subscribe to motivate me. Thank you
#raspberrypi
#Arduino
#voice

Пікірлер: 93
@ELECTRONOOBS
@ELECTRONOOBS 2 жыл бұрын
Tutorial here: electronoobs.com/eng_arduino_tut171.php My Tools: bit.ly/3uv8bc3 Help me on Patreon: www.patreon.com/ELECTRONOOBS
@tophlaw4274
@tophlaw4274 2 жыл бұрын
great straightforward tutorial as always! as a few commenters already suggested, simply using exception handling to intercept the error (when speech recognition fails) and prevent the Python script from crashing... like so: while True: try: # Your audio detection & voice recogition code here except: print("ERROR: I didn't understand what you said....") ser.write(bytes("????", 'utf-8')) Cheers! & looking forward to your next project!
@RogerTannous
@RogerTannous 2 жыл бұрын
@@tophlaw4274 yeah, that's the clean solution, and this has nothing to do with volume levels, as the device can still receive stuff at high volume levels, well above the programmed threshold, and if it doesn't understand what it has received, then we'll fall into the same exception again. So using exception handling keeps you safe from falling into this "trap" again
@RohitKumar-pl9hb
@RohitKumar-pl9hb 2 жыл бұрын
You can use try catch block to handle the exception. Great video, loved it very much.
@JonathanDeWitt1988
@JonathanDeWitt1988 2 жыл бұрын
When I saw this notification pop up this weekend I first thought you were just making a voice recognition video for the raspberry pi. Now I see you were doing it for the Arduino. Yes this is a complex looking process to set up. But the reward is amazing! The power of having voice to text on an Arduino is awesome. I hope someone can get you some help on the noise thresshold. Thank you for sharing this Andrei! It is very much appreciated.
@simonescaravati7218
@simonescaravati7218 2 жыл бұрын
That's amazing! For the error you just need to wrap the API request in a try...expect construct! it preserves the code from exit on the exception!
@ezzeldin101
@ezzeldin101 2 жыл бұрын
I was waiting for this episode, Thanks Bro❤❤
@dallasfromthefuture
@dallasfromthefuture 2 жыл бұрын
Yes!!!! I made one in html but I needed a browser for it to run. Thanks for making this, I've been wanting to make my own for the longest time
@arjunmb6032
@arjunmb6032 2 жыл бұрын
Can you share the code
@PhG1961
@PhG1961 2 жыл бұрын
Indeed I liked it ! This is way better than the module from your 1st video !
@hassantangasawi42
@hassantangasawi42 2 жыл бұрын
This was very helpful and Interesting! Thank you!
@biswajitkarmakar4700
@biswajitkarmakar4700 Жыл бұрын
Great work... 👍🏼👍🏼👍🏼 I was searching for this ...
@shemziller1
@shemziller1 Жыл бұрын
I hardly comment on channels but this tutorials is wonderful
@littlemadness221990
@littlemadness221990 2 жыл бұрын
You become greater than Great Scott. You're doing far more interesting content.
@kau_norw
@kau_norw 2 жыл бұрын
Interesting approach with many applications.
@marcelorochacomposer
@marcelorochacomposer 6 ай бұрын
Hi! Congratulations for your work and thanks for sharing it. Could you, please, tell me what was the microphone model that you used in this project? Thank you!
@BigIron_06
@BigIron_06 2 жыл бұрын
How about "on error, resume next" or what ever the proper syntax would be for an error handler on R-Pi.
@angelfernando8954
@angelfernando8954 2 жыл бұрын
it is possible to connect the elechouse voice recognition module to the raspberry pi directly? Amazing video!! Thanks to show the pros and cons you had with the project!
@user-bv5dd7os4b
@user-bv5dd7os4b 2 жыл бұрын
Thanks for explanation, it was useful. I wish you would explain to the voice command unit LD3320
@michaelandersen1161
@michaelandersen1161 2 жыл бұрын
what version of raspbian OS are you using ? and will it only work with python version greater than 3.7.3?
@johnborrell9021
@johnborrell9021 2 жыл бұрын
Excuse my ignorance here, does it have to be connected to Google, internet to work? Thanks
@Tony770jr
@Tony770jr 2 жыл бұрын
Will this work on the Pi Zero as well?
@jakemeyer8188
@jakemeyer8188 2 жыл бұрын
I think the Try...Catch approach that the others have recommended is a good. As an alternative, you could try implementing your own wakeup command. Like, it doesn't try to process anything until it gets a specific word or phrase. It might also be worth testing to see if after recieving the wakeup command, it raises the input volume programmatically. Then, after, say, 30 seconds or so, it drops the input volume back down. For this you would need to be a little extra loud on your initial command, but everything that follows would be spoken normally.
@user-bm7zw4wo2g
@user-bm7zw4wo2g 11 ай бұрын
Need tutorial use Voice rocognition V3 module with arduino to shown text in LCD or Speech to Text
@samj1012
@samj1012 6 ай бұрын
Great video.thumbs up
@ChandulWickramasinghe
@ChandulWickramasinghe 2 жыл бұрын
SUPER EXCELLENT
@antitialaman7301
@antitialaman7301 Жыл бұрын
First cool video :) I have a raspberry pi zero (not have wifi) and I would like with voice control play with leds and servos. Idk if this is posible. Can you help me? TY.
@dibyojyotibhattacherjee4279
@dibyojyotibhattacherjee4279 Жыл бұрын
what about paring it with the pi pico w??
@DonzLockz
@DonzLockz 2 жыл бұрын
very cool project!
@TheUnofficialMaker
@TheUnofficialMaker 2 жыл бұрын
You could also add a PTT button.
@JugaaduJi
@JugaaduJi Жыл бұрын
Sir some error. Please help me. When I run the code , shell showing "attempt to connect to server failed" Please help
@algre977
@algre977 2 жыл бұрын
Would it work on pi zero w ?
@electronic7979
@electronic7979 2 жыл бұрын
Very good 👍
@Andy-mm2qz
@Andy-mm2qz 2 жыл бұрын
Dear electronoobs, I am trying to make an infrared thermometer using thermopile sensor ISB-TS45D but didn't found any video or tutorial on this. could you help me with this or could you create one for your next project. Thankyou. Video is good as always with full of creativity and great knowledge.
@kyleallred984
@kyleallred984 2 жыл бұрын
1. I thought you needed a logic level converter to go between the pi's 3.3v and the Arduino's 5v. 2. Does the speech software include a trigger word function?
@digihz_data
@digihz_data 2 жыл бұрын
Since he is only sending from 3.3v(Rpi) to 5v(arduino), the arduino will recognise 3.3v as a 1. If he was sending from the arduino to the raspberry pi,yes then you would need a level shifter.
@littlemadness221990
@littlemadness221990 2 жыл бұрын
Add a filter in the software for the bytes, and use them for blank commands.
@boumsiedyoucef1064
@boumsiedyoucef1064 2 жыл бұрын
Wonderful 👍
@Ais-qc1bc
@Ais-qc1bc Жыл бұрын
No logic Volt conviter need??? for 5v logic(arduino) to 3.3v(pi)
@KimsCyraRayelMoring
@KimsCyraRayelMoring 2 ай бұрын
Thank you so muchhh sir
@siddharthmali5841
@siddharthmali5841 2 жыл бұрын
Excellent.
@hirudikapremaratne2034
@hirudikapremaratne2034 Жыл бұрын
Can I make this with a Pi3?
@rickmorris3580
@rickmorris3580 2 жыл бұрын
Awesome video but which Raspberry PI version are you using that's only $29? I don't see any Raspberry PI's on Amazon that are anywhere near that cost. I see lower cost ones on Alibaba but is a version 3 or version 4? Does i matter it's 2GB or 4GB? Thanks!
@itsmeintorrespain2714
@itsmeintorrespain2714 2 жыл бұрын
The cost of the chips has gone sky high lately due to a worldwide shortage. That's why RPis are astronomically expensive right now.
@quinman16
@quinman16 2 күн бұрын
you should try the try except code. it would look like this in your while code. """ while True: with mic as source: audio = r. listen(source) try: words r.recognize_google(audio) print (words) ser.write(bytes(words, 'utf-8')) except: pass """ the try except code will catch any error in the try block and if error happens with any part of the code inside it it jumps to the except block. you can even specify what error you want to catch, but keeping it like this works just fine for beginners. hope this helps you on your python journey.
@CHGOfficial512
@CHGOfficial512 Жыл бұрын
Great project but Raspberry Pi-s are greatly overpriced at the time, will it also work on alternatives like orange pi, etc?
@sjlohitprakash5092
@sjlohitprakash5092 Жыл бұрын
use Try and Except statements in the loop to solve the issue.
@shriyagupta8505
@shriyagupta8505 8 ай бұрын
Not able to install speech recognition module
@GnobarEl
@GnobarEl 2 жыл бұрын
Another great video. When you will build a robot to react to your voice?
@ELECTRONOOBS
@ELECTRONOOBS 2 жыл бұрын
Working on it but it has multiple parts...
@GnobarEl
@GnobarEl 2 жыл бұрын
​@@ELECTRONOOBS Hi, thanks for your comment. I think that's the best approach. I wouldn't mind seeing every week a video of the evolution. It would help me to buy the parts, and build my own robot following your videos. If you do a video with all the processes it will be hard to follow. So yes, multiple parts is the best. It will be my next fav TV show! :p Regarding the issue, can't you make a condition - If the output is empty (no output) something like ... if words == "" ... I'm not exactly sure, but I believe it will be something like that. You need to make an else condition in case it has an output from google API or not. Keep your great work!
@marcelooscarjose8515
@marcelooscarjose8515 Жыл бұрын
why not use WIT AI just for decode audio to text and then use Google api to create audio and play it in ESP32 ? Why do you need raspberry pi ?
@antitialaman7301
@antitialaman7301 Жыл бұрын
Can you make a tutorial about how use a recognition voice with raspberry pi zero, please? I try with so many differents libreries and I just had lucky with 1, it works so slow... I will so greatfull if you can help me, I spent months try and I had not lucky. The last library I tried to use it was cheetah (it supouse works offline)
@AjinkyaMahajan
@AjinkyaMahajan 2 жыл бұрын
For voice recognition, does it require an internet connection or does it work stand alone?
@flethacker
@flethacker 2 жыл бұрын
it requires connection to Google to do voie recognition. But if you download Google and put Google in your home directory (with a sym link and with sudo) you can run it off line
@idko5452
@idko5452 2 жыл бұрын
Dirty fix to Your problem : use LED to visualy see when Your voice recogn. Is active and 1 button to restart the code. I have used button for similar actions and it's easy to set up. But I'm not 100% sure about LED bc I have never had LED connected to RPi 😂 but it should work if You spend some time on it.
@samwechsler
@samwechsler Жыл бұрын
For RPi4 I had to use dtoverlay=pi3-disable-bt instead of the one in the video. Also had serial port permission issues so had to use sudo chmod 777 /deb/ttyAMA0 . Has anyone figured out how to get ride of the red ALSA lib text in the shell when running?
@PraiseTheLord527
@PraiseTheLord527 Жыл бұрын
Hey Sam, Were you able to resolve this issue? I'm unfortunately having the same problem... Did you have a sound card connected to your raspberry pi because I am using a webcam with in built microphone? Have a nice day!
@bheeshmavasuprasad
@bheeshmavasuprasad 2 жыл бұрын
Hello, is the t12 soldering station worth it and does it have high thermal capacity? What is the wattage?
@hnasje66
@hnasje66 2 жыл бұрын
for the error you can probably use the python try except else sequence.
@kabandajamir9844
@kabandajamir9844 2 жыл бұрын
So nice
@holayou
@holayou 10 ай бұрын
i have a error in the line 12 . also another error says: /home/(my user)/. local/lib/python3.9/site-packages/speech_recognition/__init__.py", line 728 in recognize_google. how i can solve?
@techieelectro
@techieelectro 2 жыл бұрын
What's up my friend 😃👍
@electronicajean727
@electronicajean727 Жыл бұрын
yo quiero hacer una voz en español con teclado y pantalla para mejor entender
@IronMechanic7110
@IronMechanic7110 Жыл бұрын
I prefer to use Vosk to Speech recognition.
@stephensu4371
@stephensu4371 2 жыл бұрын
nice one
@haroshinkk5465
@haroshinkk5465 3 ай бұрын
it is not showing the start speak
@howardchen8030
@howardchen8030 Жыл бұрын
not work.... a lots error when run the code
@kalebepinheiro4634
@kalebepinheiro4634 2 жыл бұрын
Nice
@stevenA44
@stevenA44 2 жыл бұрын
This is a very interesting project. I think I already have everything to make this. I might give it a try sometime. So I have been asking why you have a banana in all your videos and you never answer, so I googled it and found out. For size reference, because using a ruler would just be silly. LOL
@bluedeath996
@bluedeath996 2 жыл бұрын
I need one that is offline. Transmitting and recieving is not great.
@simonescaravati7218
@simonescaravati7218 2 жыл бұрын
in python lib it says that there's one, CMUSphinx
@motog4plus316
@motog4plus316 2 жыл бұрын
🤝🏻👌🏻
@rustamakhmullaev5697
@rustamakhmullaev5697 2 жыл бұрын
Try except maybe help....
@michaelandersen1161
@michaelandersen1161 2 жыл бұрын
Hi there I have made a new raspbian sd card with raspbian bullseye as you use and it has python 3.9.2 as default. But when i run the python code I get a lot of errors like.. ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_headpho.pcm.front.0:CARD=0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM front ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear Do I miss some configuration or what ?
@PraiseTheLord527
@PraiseTheLord527 Жыл бұрын
Hey Mr. Anderson, Were you able to resolve this issue? I'm unfortunately having the same problem... Did you have a sound card connected to your raspberry pi because I am using a webcam with in built microphone? Have a nice day!
@Fratzenzeuch
@Fratzenzeuch 2 жыл бұрын
Good explenation, but it's not an offline solution
@Emulation_Inflation
@Emulation_Inflation 2 жыл бұрын
Is anyone else's youtube vanced keep sending a push notification for this video?
@aravinthbosem3652
@aravinthbosem3652 2 жыл бұрын
Use Try and catch block so the program won't get stop due to noice
@jyvben1520
@jyvben1520 2 жыл бұрын
while True: try: voice block code here, the code that works ... but crashes when ... except: pass # ignore any errors/exceptions
@hackerbuddy873
@hackerbuddy873 2 жыл бұрын
First to comment
@hackerbuddy873
@hackerbuddy873 2 жыл бұрын
Thanks for giving me heart ❤️
@AdobadoFantastico
@AdobadoFantastico Жыл бұрын
Wow the price of the pi has jumped so much.
@youssefahourri3245
@youssefahourri3245 2 жыл бұрын
Well done 👍🏻 I don't know if it supports Arabic speech
@ELECTRONOOBS
@ELECTRONOOBS 2 жыл бұрын
I think this is just English but since is Google API, I bet you can change to any other language
@TBL_stevennelson
@TBL_stevennelson 2 жыл бұрын
If you try a different language let us know the Out come
@bepstein111
@bepstein111 2 жыл бұрын
uhhhh where are YOU finding RPi's for 40 bucks on AE???? They're like 200 bucks MINIMUM for me.....
@danpedersen55
@danpedersen55 2 жыл бұрын
try eBay, there's plenty.
@AntonioDellaRovere
@AntonioDellaRovere 2 жыл бұрын
try .. catch .. block
@FuzanToko
@FuzanToko 2 жыл бұрын
fix: ``` try: words = r.recognize_google(audio) except UnknowValueError: words = "Error!" finally: print(words) ser.write(bytes(words, 'utf-8')) ``` if you want catch others errors migth consider include the 'context manager' (with mic as...) on the try except block. and 'catch' his own expections or all exceptions 'except Exception:'. Greettings 👨‍🔧️
@amciaapple1654
@amciaapple1654 2 жыл бұрын
Pffffff.... Sending your voice to Google for recognition so they listen to everything you say. You've got to be kidding! What's next? Sending the video feed from your bedroom to them, too ?
@harshavardhanaradhyahu2870
@harshavardhanaradhyahu2870 3 күн бұрын
I got an error in pyaudio it prompt like this Failed in 'src/hostapi/alsa/pa_linux_alsa'
@stefano.a
@stefano.a 2 жыл бұрын
Excellent video. For the error, have you tried try..except instruction? KZbin seems to eliminate posts with links without any message, so, you will find a solution in stackoverflow On the subpage /questions/32005310/speech-recognition-python-code-not-working
Raspberry Pi AI: Picroft Voice Assistant
21:34
ExplainingComputers
Рет қаралды 161 М.
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 35 МЛН
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 104 МЛН
3M❤️ #thankyou #shorts
00:16
ウエスP -Mr Uekusa- Wes-P
Рет қаралды 12 МЛН
Voice Recognition Module - 254 Voice Commands + UART
11:51
Electronoobs
Рет қаралды 195 М.
I Built a Personal Speech Recognition System for my AI Assistant
16:32
Four Simple Speech Recognition Products
16:04
James Bruton
Рет қаралды 72 М.
Speech Recognition With Raspberry Pi
11:56
Audas
Рет қаралды 36 М.
You won't believe how fast it is | Raspberry Pi Speech-to-Text
6:54
Raspberry Pi 5: EVERYTHING you need to know
20:32
Jeff Geerling
Рет қаралды 1,1 МЛН
The ULTIMATE Raspberry Pi 5 NAS
32:14
Jeff Geerling
Рет қаралды 1,6 МЛН
The Ultimate Guide to using Motors in Robotics (including ROS, Raspberry Pi)
25:56
Как слушать музыку с помощью чека?
0:36
Choose a phone for your mom
0:20
ChooseGift
Рет қаралды 5 МЛН