X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=google_assistant.py;h=b34197a3e60d0db9eff5c9cc6609ebe04e581bab;hb=4c315e387f18010ba0b5661744ad3c792f21d2d1;hp=a50003c7eb2a41e8326714ad24e4eccd2ec6cc34;hpb=4faa994d32223c8d560d9dad0ca90a3f7eb10d6a;p=python_utils.git diff --git a/google_assistant.py b/google_assistant.py index a50003c..b34197a 100644 --- a/google_assistant.py +++ b/google_assistant.py @@ -45,10 +45,16 @@ audio_url: {self.audio_url}""" def tell_google(cmd: str, *, recognize_speech=True) -> GoogleResponse: + """Alias for ask_google.""" return ask_google(cmd, recognize_speech=recognize_speech) def ask_google(cmd: str, *, recognize_speech=True) -> GoogleResponse: + """Send a command string to Google via the google_assistant_bridge as the + user google_assistant_username and return the response. If recognize_speech + is True, perform speech recognition on the audio response from Google so as + to translate it into text (best effort, YMMV). + """ logging.debug(f"Asking google: '{cmd}'") payload = { "command": cmd,