Speech Recognition

I have written the code for speech recognition as told by the course and it is not showing any error but when i run the code and speak in the microphone then nothing is recorded or displayed. I have attached the screenshot of the code and the problem below please help

Sorry bro no one is replaying about this error my error is same and Iā€™m waiting from 10 days for my answer

Hi @gjain1_be19

You code is working as expected. You will have to check if the virtual machine is receiving your Microphone input. This seems to be a case where your Virtual Box is not receiving the microphone input.

Attaching a link from the Virtualbox forum to solve the audio issue: https://forums.virtualbox.org/viewtopic.php?f=6&t=99173#:~:text=The%20Audio%20section%20in%20a,the%20Enable%20Audio%20check%20box.

Let me know if this works.

Also @gjain1_be19, Try adding the following line and see if audio gets captured:

with mic as source:
    r.adjust_for_ambient_noise(source)             # <----- add this line
    audio = r.listen(source) 

Check and let me know if this solution works. Also, try out the one pointed above.

Thankyou Sir, Your answer solved my problem!

1 Like