How to add hearing/speech recognition in your AI/chatbot.

So, this is very easy to do than you think it's basically importing and execution.

How to add hearing/speech recognition in your AI/chatbot.

So, this is very easy to do than you think it's basically importing and execution.

If you are not already setup with a chatbot go read my medium article on how to make one:

let's get started this one is going to be pretty short and easy.

Firstly the imports:-

Lets now create the recogniser:

Lets define our microphone:(if you want to specify the microphone you want to use you can, but here I use the first available microphone in my system)

Now lets record our input speech:

Now basically lets use googles library to recognise the speech and conver into a text string:

exporting the result in a text file (you can also directly return the result):

And bam! the code is finished just import and use.

For example lets see the results on my AI name β€œDEW”:

So with just two lines of code in line number 15 and line number 92 our AI now has hearing!!

If you liked the article consider following 😁.

If you want more stuff here is my github:

For reciving more updates on my AI/ML research here is my twitter:

Thanks for reading hehe 😁