Voice apps interface using python module

Not able to understand the module ‘voice apps interface using python’. Videos for topics in that module too would help. :sweat:

What are u talking about, could u elaborate please? R u talking about what is the use of python in voice interface?

I was talking about this module sir, I am not getting the >>> or the interpretor session when I type python3. If I open it in a new page, speech recognition is not working. :sob:

@ashwin.salgaocar sir

@Deepanjali had u downloaded python in your os?

yes, i have downloaded python.

@Deepanjali is it showing like this?

@subham3140 Firstly, Thank you so much for trying to help me. Here I have explained my problem.

After I type python3, the >>> doesn’t come. So, I pressed ctrl+c .Now I got something like this here I typed python3 and it worked and everything went smoothly until this, i literally waited for 10 min for the >>> to return after I said hello, but it doesn’t.
so again i pressed crtl+c and wrote the code for ambient noise but that doesn’t work either.
I hope you understad I can’t explain better than this.

@Deepanjali when u type python then it must show it’s own interpreter but in you case it’s not showing because of two reason, either u have not installed correctly or u have to add a environment path so that os can run python

i have followed all the steps they told as it is. i don’t know where it went wrong. also the commands are a bit confusing, once they ask to type python3 once they ask to type python…not clear which one to type.

@Deepanjali chill, it’s not a big deal ok. Don’t worry.


I have tried the same today and I’m getting the same problem. When I give the command:
~$ python3 -m speech_recognition
it takes a while to load and then after the ‘say something’, the system is able to get my voice. All good till here.

But when I tried as said from the course, to record the input from python interpreter, my voice is not being taken. The ‘>>>’ part is not coming just like your case. Then I typed crtl+c and typed the command ‘>>> r.recognize_google(audio)’ in the interpreter. This is the error I’m getting.

I really hope someone could help me with a solution fix :no_mouth:. Just to mention that the mic is working and my input is taken while with this command in the terminal ‘~$ python3 -m speech_recognition’

Please be generous to help me out.

If you are using linux in virtual box. Do this step by step

  1. Open the virtual box. It would look like this.
  2. Go to Settings > Audio
  3. In “Extended Features”, Enable Audio Input and Output

After this, run the python file again and it will recognize the audio

1 Like

That is very kind of you @dkunvarani to send screenshots of possible fixes. I have rechecked those areas and they are in the same condition as you have mentioned. But I have tried again to check if it will work.

Again like the last time, after the with block, I waited for like 5 minutes to get the ‘>>>’ prompt but it did not come back.
So I have used the ctrl+x command to get the control and tried to check if my audio variable is recognizable. And so I tried to recognize it with google as below.

And again, there are some errors that I can’t understand with my knowledge.

I hope you guys could find a fix for this.
Thank you in advance.

@jpravachan777 The error basically means, your microphone could not pick up any audio, hence the error. This can get very tricky as it is an audio issue. You will have to check your audio settings between the Virtual machine and the host machine. If you have a Linux OS as the host machine, then such issues may not occur.

Please make sure you are selecting the right audio drive, audio controller in the audio settings.

Hello @ashwin.salgaocar,

I would like to share my audio setting screenshots in my virtual box
I hope that it may pinpoint any issue specifically

Please tell me if there are any changes that I have to make.
Thank you for responding by the way :slight_smile:

Hello @ashwin.salgaocar,

I also forgot to mention that when I give the command “python3 -m speech_recognition” in the terminal, my audio response is getting recognized.

I hope this gives you more finds to know if the issue is of the microphone or maybe anything else.

@jpravachan777 in that case, you can write the entire code in a .py file and then run and check if you still face the same issue.

@jpravachan777 it will take some time. I experienced the same issue. Try to speak clearly and loudly… And if you have connected any type of Bluetooth or headphones or even earphones, remove it and then speak.

Okay, thank you for the advice!