0

I have been making a speech recognition and here is my code-

`import speech_recognition as sr

def listen():

r = sr.Recognizer()

with sr.Microphone() as source:
    print("Listening...")
    r.pause_threshold = 0.9
    audio = r.listen(source,0,5)

try:
    print("Recognizing...")
    query = r.recognize_google(audio,language="en-in")
    print(f"You Said : {query}")

except:
    return ""

query = str(query)
return query.lower()`

This code works very accurately...but i want to make it faster. More like the speech recognition of google that shows the words as you speak. How do I do it ?

I tried the Watson speech to text of IBM but since its not free i cant apply it for a long term.

  • This question is not related to Python, but to the (web) service that is being called to perform voice-recognition. You need to find free services that provide unlimited voice-recognition through a Python API. – C-3PO Nov 06 '22 at 09:06
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Nov 07 '22 at 06:36

0 Answers0