Convert your live Voice into Text using Google's SpeechRecognition API in ten lines of Python Code

preview_player
Показать описание
Speech Recognition in Python through Google's Speech
Recognition API

In this video I'm showing how you can convert your spoken words recorded by your Microphone into Text using Google Speech Recognition API.
You can record continuously your audio and the program will automatically searches for Text

Source Code:

Download Python:
Рекомендации по теме
Комментарии
Автор

Anyone who is stuck at "PyAudio not found... error". Hit the following in your CMD/Terminal:
pip install pyaudio
I'd love all of your supports on Patreon:

RiteshKumarMaurya
Автор

Watch my new video -How to open a url in Chrome Browser through your voice:

RiteshKumarMaurya
Автор

Thanks for all of your comments and subscriptions.
If you need a tutorial on some package in Python then just tell me.,
I'll try my best to solve them.

RiteshKumarMaurya
Автор

You will not be able to see any errors because we have passed any exception raised by the Interpreter.
To see all of them, Change your code from,

except:
pass

TO

except Exception as e:
print (e)

Now if you are getting the errors, tell me and I will try my best to solve them.

Hit a like and Subscribe my channel if you think this video helped you!

RiteshKumarMaurya
Автор

Want to Convert any Audio into Text. Watch this new video:

RiteshKumarMaurya
Автор

its working properly but you forget to say pip install pyaudio
Thank you verymuch

niranjanguptha
Автор

For anyone who is stuck at "Say something" with no errors, try this:
r = sr.Recognizer()
r.energy_threshold = 500
r.energy_threshold doesn't have to be 500, you can experiment with much higher values. It didn't work for me until I set it to 2000, and it works up to almost 10000 for me.

infinitasalo
Автор

Awesome!
Wish you good luck with your future visions!!

RubberTag
Автор

I needed that and you did it just in ten lines of python code

archanamaurya
Автор

Hello rithesh successfully I completed my project and my mentor appreciated me.. Thank you so much boy...

mallusreddy
Автор

It is showing me an error of' please build and install the PortAudio python bindings first however I have already installed pyaudio along with latest upgrade of pip PLZZ give a soln asap

Useracwqbrazy
Автор

Great video

I have one question, when we use Google library its require internet or not

ravindrakumarvara
Автор

I found following code, allowed me to use internal laptop microphone:

import speech_recognition as sr

r = sr.Recognizer()
r.energy_threshold = 2000


with sr.Microphone() as source:
print('Say Something')
audio = r.listen(source)

try:
print("Speech was:" + r.recognize_google(audio))
except LookupError:
print('Speech not understood')

johnjohnson
Автор

You helped me install pip on cmd when I was struggling so I this video got recommended to me. I did not think it was going to work and then it didin't, but then I installed pyaudio and boom! It was up and running. Not perfect but pretty good for 10 lines of code. Thank you so much! I can't believe your channel only has 1.2K followers!

darkchocolate
Автор

i need help i am not able to use it as it say import speech_recognition as sr

r = sr.Recognizer()
with sr.Microphone() as source:
print ('Say Something!')
audio = r.listen(source)
print ('Done!')

text = r.recognize_google(audio)
print (text)

can you please help i tried lot of method installing pyaudio and port audio

need help !

SoumilShah
Автор

hey bro.. my program is run but my audio not recognize... plzz help me

jogendrasuryawanshi
Автор

which one we have to download there are so many options...
"Download Windows x86-64 web-based installer"
"Download Windows x86-64 executable installer"
"Download Windows x86-64 embeddable zip file"
in the above mentioned things which one should i install to pc

harishsurapureddi
Автор

Rithesh how do u compare with Google speech recognition and Google cloud speech recognition? Which one gives fast and accurate results can u tell me? See I have done with Google speech recognition from very good tutorial and then pocket sphinx(as u have share link there is no accurate and past results also.) now my mentor suggesting me to do Google cloud ist possible to do, please. can u guide me or share some links..

mallusreddy
Автор

Great Job :)
Have a doubt, what we speak over the microphone, is there a way where in we can save those outputs text directly to notepad?

sidnayak
Автор

Thank you Ritesh for creating such an informative video.

sameerk