diff --git a/speech_recognition/recognizers/google.py b/speech_recognition/recognizers/google.py index e0ddadab..e020209e 100644 --- a/speech_recognition/recognizers/google.py +++ b/speech_recognition/recognizers/google.py @@ -106,7 +106,7 @@ def create_request_builder( if not isinstance(language, str): raise ValueError("``language`` must be a string") if key is not None and not isinstance(key, str): - raise "``key`` must be ``None`` or a string" + raise ValueError("``key`` must be ``None`` or a string") if key is None: key = "AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw"