Python syntax error in my program speech recognizer

Screenshot 2023-12-16 102215
error is
query = recognizer.recognize_google(audio, language=‘en-IN’)

Anyone give me the perfect solution?

Screenshot 2023-12-16 102215

Please do not post screenshots. Where possible, please copy/paste the
entire error message as text, between "code fences, eg:

 ```
 computer output
 goes here
 ```

error is
query = recognizer.recognize_google(audio, language=‘en-IN’)

This is just the line of code where the error was noticed, not the
cause. I would guess that you opened a try/except block with a try
and then had your query = assignment at the same indentation as the
try instead of indented further.

We would need to see the full code to know.

Cheers,
Cameron Simpson cs@cskk.id.au

1 Like

What exactly is unclear about the error message?