Python 3 Speech Recognition Script to Get List of Installed Microphones and Audio Devices Info
412 views
Jun 1, 2025
Get the full source code of application here:
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
module by the help of which you can
0:06
actually print out all the microphones
0:10
or all the audio devices that are
0:12
installed on your machine So sometimes
0:14
you can't uh actually know which kind of
0:18
microphone you are using Uh for those
0:20
scenarios this script will be very much
0:23
useful There is a module right here
0:25
which lets you print all the microphones
0:28
and all the audio devices which are
0:29
there on your PC It's called as speech
0:32
recognition It's a third party module
0:35
You just need to install this first of
0:37
all before running the
0:40
script Simply search for this module
0:43
which is speech
0:45
recognition
0:48
So I have already installed
0:52
it I think Yeah this is actually the uh
0:55
command here Simply install
0:58
this So after installing
1:03
it uh let me just make a simple file
1:06
here app py file and then we import this
1:08
module speech recognition as SR and then
1:12
we simply print
1:14
out the microphones which are available
1:18
inside your system It will give you a
1:21
complete list alongside with
1:25
the number assigned to it So using this
1:29
you simply say SR microphone dot list
1:34
microphone
1:36
names It also has the second method
1:38
which lists all only the working
1:42
microphones Let me show you both the
1:44
methods First of all list microphone
1:46
names This will show the total number of
1:48
microphones which are there inside your
1:50
system and it will print
1:55
out the index number alongside with the
1:59
name of the microphone as well So if I
2:01
try to run this Python script you will
2:02
actually see uh let me run this You will
2:06
see it will list out all the microphones
2:08
and all the audio devices which are
2:10
there inside your system alongside with
2:14
which index number is attached to it
2:16
This is the most important thing because
2:18
uh sometimes you don't know which index
2:21
is attached to which microphone So it
2:23
tells you which is zero index So in this
2:28
easy way you can troubleshoot or locate
2:30
which microphone that you are using
2:32
There is also contains the second method
2:34
here which is the list working
2:37
microphones only So this will only work
2:40
this will only list out all the working
2:45
microphones So you will see it only
2:47
gives you the list of working
2:51
microphones So this is essentially this
2:54
package here Definitely use it to
2:57
actually list out all the microphones
2:58
and audio devices which are there on
3:00
your PC And also check out my website
3:03
freemediattools.com
3:05
uh which contains thousands of tools
#Audio Equipment
#Consumer Electronics
#Intelligent Personal Assistants
#Podcasts
#Programming
#Software
#Voice & Video Chat