X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=google_assistant.py;h=b0aabf37095ef986b35b726d02700f55d017f78b;hb=5c212d7639f62fcb936f9d7a0bbe704a9f7b213d;hp=0af4fa9271df3bf2e6de6f3571cfa6c2eb6d1f23;hpb=9eba12cba5641d6a0b988038694cbc2dd52800c5;p=python_utils.git diff --git a/google_assistant.py b/google_assistant.py index 0af4fa9..b0aabf3 100644 --- a/google_assistant.py +++ b/google_assistant.py @@ -2,8 +2,8 @@ import logging import sys -from typing import NamedTuple, Optional import warnings +from typing import NamedTuple, Optional import requests import speech_recognition as sr # type: ignore @@ -70,6 +70,7 @@ def ask_google(cmd: str, *, recognize_speech=True) -> GoogleResponse: audio_transcription: Optional[str] = "" if r.status_code == 200: j = r.json() + logger.debug(j) success = bool(j["success"]) response = j["response"] if success else j["error"] if success: