control your google home
Project description
googlecontroller
Library for Python 3.8+ to push text message or audio file with the Google Home.Originally made by - Thomas Deblock (@tdeblock) I have expanded most of the code quite a bit little of the original remains, but the idea came from Mr.Deblock.This is a sorta v2 for the googlehomepush module they made.
Installation
finally a pypi!!!!!!!
pip install googlecontroller
Depending On
PyChromeCast
How to use
from googlecontroller import GoogleAssistant
from googlecontroller.http_server import serve_file # for local files
host = "ip"
home = GoogleAssistant(host=host)
home.say("test")
home.play("http://www.hubharp.com/web_sound/BachGavotteShort.mp3")
file_url = serve_file("/path/to/file", "audio/mp3") # local
home.play(file_url, "audio/mp3")
home.volume(100)
home.volume(0)
.say(text, speed,ignore, lang)
Push a message on Google home
textis the test message to sayspeedis the rate of speed of the message ranges from 0.000+ as slowest to 1 as normal speed.ignoreignore if audio is playing and play it regardless if ignore=True and only play if not playing if ignore=False or is not specified.langthe text language, default value is 'en' to change it have lang = 'language' as described in google translate en-Us, es (spanish), ect
.play(url, ignore, contentType = 'audio/mp3'):
Push a sound to Google home
urlan audio file URLignoreignore if audio is playing and play it regardless if ignore=True and only play if not playing.If ignore is not specified it will be set to False.contentTypethe audio file content type
.volume(volumelevel):
volumelevelthe volume level from 0-100 Example: home.volume(5) or home.volume(volumelevel=5). If you want to take it as user input you can do volumelevel=input().
Maintainers
- Dray-Cyber
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file googlecontroller-3.0.6.tar.gz.
File metadata
- Download URL: googlecontroller-3.0.6.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6a8b738cbb021f6f1e677634e671ea03c97b44abe7ce8b817fcfeef9d9b44f1
|
|
| MD5 |
4f7cebc839c2dd9ae0f8b7c37cf1d584
|
|
| BLAKE2b-256 |
31572a7720c3ff8c6fb2fff447f7a3d9d37336918b17bb31f857e5629e40d04a
|
File details
Details for the file googlecontroller-3.0.6-py3-none-any.whl.
File metadata
- Download URL: googlecontroller-3.0.6-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05bc7b6c4a8329b4f316c2df400634398e0873eba28cbdd52f218bd0480969e4
|
|
| MD5 |
fd15f66f36ad472819fd35a711bd9f47
|
|
| BLAKE2b-256 |
04fcd39ae32cb4a3f023c9617aa74a57da31b3c043247c5dd3dd35103f3a4f10
|