summaryrefslogtreecommitdiff
path: root/google_assistant.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2021-09-08 23:29:05 -0700
committerScott Gasch <[email protected]>2021-09-08 23:29:05 -0700
commit709370b2198e09f1dbe195fe8813602a3125b7f6 (patch)
tree5bbe521d7973f86526ed09d4411a5b3ff0e23aaa /google_assistant.py
parentb10d30a46e601c9ee1f843241f2d69a1f90f7a94 (diff)
Add doctests to some of this stuff.
Diffstat (limited to 'google_assistant.py')
-rw-r--r--google_assistant.py6
1 files changed, 6 insertions, 0 deletions
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,