diff options
Diffstat (limited to 'google_assistant.py')
| -rw-r--r-- | google_assistant.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/google_assistant.py b/google_assistant.py index 572b4cc..041648c 100644 --- a/google_assistant.py +++ b/google_assistant.py @@ -3,6 +3,7 @@ import logging from typing import NamedTuple import sys +import warnings import requests import speech_recognition as sr # type: ignore @@ -93,7 +94,9 @@ def ask_google(cmd: str, *, recognize_speech=True) -> GoogleResponse: logger.debug(f"Transcription: '{audio_transcription}'") except sr.UnknownValueError as e: logger.exception(e) - logger.warning('Unable to parse Google assistant\'s response.') + msg = 'Unable to parse Google assistant\'s response.' + logger.warning(msg) + warnings.warn(msg) audio_transcription = None return GoogleResponse( success=success, |
