Google home push
Library for Python 3.4+ to push text message or audio file with the Google Home.
Installation
pip install googlehomepush
Dependencies
PyChromecast depends on the Python packages gTTS, pychromecast. Make sure you have these dependencies installed using pip install -r requirements.txt
How to use
from googlehomepush import GoogleHome
GoogleHome("LivingRoom").say("test")
GoogleHome("LivingRoom").play("http://www.hubharp.com/web_sound/BachGavotteShort.mp3")
API
GoogleHome(devicename = None, host = None, port = None, tts_builder = googleTTS_Builder)
Create a new Google Home instance (a device name or host is mandatory).
devicenamecan be the google home name, or its IP (local).hostan ip of a Google Homeportport used to connect Google Hometts_builderthe tss engine to use. Available tts are:googleTTS_Builderimport withfrom googlehomepush.googletts import googleTTS_builder. Free TTS used by google translate. It's the default enginegooglecloudTTS_builderimport withfrom googlehomepush.googlecloudTTS import googlecloudTTS_builder. Google cloud TTS engine. See https://cloud.google.com/text-to-speech/docs/reference/libraries to create an account.
.say(text, lang = 'en-US')
Push a message on Google home
textis the test message to saylangthe text language, default value is 'en'
.play(url, contentType = 'audio/mp3'):
Push a sond to Google home
urlan audio file URLcontentTypethe audi file content type
You can play a local file using http_server
from googlehomepush.http_server import serve_file
file_url = serve_file("/path/to/file", "audio/mp3")
GoogleHome("LivingRoom").play(file_url, "audio/mp3")
Maintainers
- Thomas Deblock (@tdeblock)
Metadata
Release files for googlehomepush 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| googlehomepush-0.1.0.tar.gz | 5.6 kB | Without provenance | Details for googlehomepush-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| googlehomepush-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for googlehomepush-0.1.0-py3-none-any.whl |
Total release size: 13.1 kB
Release files / googlehomepush-0.1.0.tar.gz
| Download URL | googlehomepush-0.1.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77d1d979b919a35e6276c39c00f68c037cbdd033bcd31f421e29a67bdb52d356
|
|
BLAKE2b-256 checksum How to use checksums |
2a34fd1fc790e808fc9e86783d6700e3400a4707c7c9d35980a8416de19d2469
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|
Release files / googlehomepush-0.1.0-py3-none-any.whl
| Download URL | googlehomepush-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ddd792b2461c78add80df2a989f8241e15b3eae546f9485a4e805b91b293bca
|
|
BLAKE2b-256 checksum How to use checksums |
a2c1dd831d5f7bc37a494a3f75d461b60cfd273cc92006e09a51cd13898dbd53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|
Security for googlehomepush 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.