This error was solved with the following SO post. Seems the typing_extensions package which is required to run speech recognition package was too old.
speech-recognition-error-object-has-no-attribute-recognize-google