Python 3 Google Translator API to Build Voice Recognition System in Terminal Using Microphone
408 views
Jun 3, 2025
Get the full source code of application here: https://codingshiksha.com/python/python-3-google-translator-api-to-build-voice-recognition-system-in-terminal-using-microphone/
View Video Transcript
0:00
uh hello guys welcome to this video So
0:02
in this video I will show you a Python
0:04
script which will actually make you a
0:06
audio translator right inside your
0:09
terminal using your microphone So
0:11
whatever you will speak it will be
0:13
translated in real time and then it will
0:15
create a audio file instantly So this is
0:18
actually the Python script that I
0:19
prepared right here You will see that if
0:21
I run this Python script it will ask you
0:24
to speak instantly So let me run this So
0:28
as you can see it is listening here So
0:30
whatever you are speaking right here
0:31
from your microphone it is captured
0:34
through your
0:36
microphone and then it is you can see it
0:38
is recognizing it Whatever you have said
0:41
you will see it has captured this It has
0:44
printed out in the terminal So now it is
0:47
saying to us that enter the language in
0:49
which you want to convert So I will say
0:51
Hindi So now it will actually convert
0:54
everything that you have put into the
0:57
Hindi
0:59
language So now it is recognizing it and
1:02
then it has converting it to
1:07
the language currently is not available
1:12
So I will say
1:18
Africans Africans
1:27
So you will see all these languages are
1:31
there AF
1:36
AF So now you will see
1:39
it's
1:42
Afreans It is
1:46
detecting UDU
1:54
So you just need to make sure
1:57
that so basically it created this MP3
2:00
file here As you speak on those words
2:02
here it created this MP3 file If I try
2:04
to play this file let me just turn on
2:13
the
2:16
delete again run
2:19
this So now you can see you're speaking
2:21
through your microphone So whatever
2:23
you're speaking through the microphone
2:24
is capturing through it So it will print
2:26
it out in the
2:33
terminal And now you just need to put
2:36
the language
2:37
udu So now it will actually try to
2:41
convert this
2:42
into UDU
2:59
Udo So this is essentially the
3:02
application You can try this on your own
3:03
m uh system as well Sometimes it works
3:06
sometimes it doesn't So you just need to
3:08
make sure that you are writing or
3:10
listening it at the very correct time
3:13
here So it will recognize it Udu
3:29
udu
3:35
English So it created this file here You
3:38
can see MP3 file
3:40
So just need to make sure listening it
3:43
at the very correct time here So I have
3:45
given the script on my website You can
3:48
try copying this script and pasting it
3:50
inside your own machine So for building
3:53
this application we are using some quite
3:55
a number of third party packages which
3:58
is first of all let me show you the
4:01
packages that we are using here which is
4:04
first package is for playing the sound
4:06
here which is this package play sound
4:08
The command is simple you install this
4:11
Secondly we are for translating we are
4:13
using this package Google translate an
4:16
official client of Google translate APIs
4:19
This install this as
4:21
well And after that we also using to
4:25
create the MP3 file we are also creating
4:27
you using this GTS Google
4:31
texttospech module inside Python So
4:34
install this as well So these three
4:36
modules we are using for building this
4:38
application I have given the script in
4:40
the description of the video You can
4:42
copy that script and run this script on
4:45
your own machine as well Also check out
4:48
my website freemediatools.com
4:51
uh which contains thousands of tools
#Email & Messaging
#Intelligent Personal Assistants
#Software
#Voice & Video Chat