Skip to main content

googlecontroller

GITHUB EXCLUSIVE KNOWLEDGE FOR SERVE_MEDIA HERE Library for Python 3.9+ 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 Pyngrok

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, opentunnel = 0") # we are doing opentunnel as this is the first time doing it
home.play("http://www.hubharp.com/web_sound/BachGavotteShort.mp3) # you do this after the first opening

#When serving media NEVER USE A \ ONLY USE /
#when doing your first home.serve_media you have to include a 3rd variable, opentunnle!For that 1 first time you have to set it manually to a 0!
#opentunnel = 0
#YOU MUST USE A DELAY IF DOING MULTIPLE IN A ROW FINE TUNE AS YOU SEE FIT
#like this home.serve_media("YourMedia.mp3", "C:/Users/YOU!/Music/", opentunnel)
#**then never use that variable again**
home.serve_media("YourMedia.mp3", "C:/Users/YOU!/Music/") # 1st is the name of the media, second is the full path to media location!
home.volume(100)
home.volume(0)

.say(text, speed,ignore, lang)

Push a message on Google home

  • text is the test message to say
  • speed is the rate of speed of the message ranges from 0.000+ as slowest to 1 as normal speed.
  • ignore ignore if audio is playing and play it regardless if ignore=True and only play if not playing if ignore=False or is not specified.
  • lang the 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

  • url an audio file URL
  • ignore ignore 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.
  • contentType the audio file content type

.volume(volumelevel):

  • volumelevel the volume level from 0-100 (must be a integer) Example: home.volume(5) or home.volume(volumelevel=5). If you want to take it as user input you can do home.volume(volumelevel=input()).

Maintainers

  • Dray-Cyber

Metadata

Release files for googlecontroller 6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for googlecontroller 6
File Size Uploaded
googlecontroller-6.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for googlecontroller 6
File Interpreter ABI Platform
googlecontroller-6-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / googlecontroller-6.tar.gz

Download URL googlecontroller-6.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6ccb4c63d578da3f33464ec87d808b5214e1ca1197ab415c37f2e968245b80bc
BLAKE2b-256 checksum
How to use checksums
79dfc691c8ddfb4249c897e144d312ae4a73085827f419fd15995a444e7070f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.0

Release files / googlecontroller-6-py3-none-any.whl

Download URL googlecontroller-6-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f8510deadad5020a39669f4ea0d0ff284ae6d10270f0c8c376e3cdf742d64d2
BLAKE2b-256 checksum
How to use checksums
81cb7a38f71d83ec7715175acfffde4993d2f206e8276838f29f1d373c8d59c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.0

Release history Release notifications | RSS feed

This release

6 This release

2 release files

5.8

2 release files

5.7

2 release files

5.6.5

2 release files

5.6

2 release files

5.5.6

2 release files

5.5

2 release files

5.3

2 release files

5.1

2 release files

5

2 release files

3.6

2 release files

3.5

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.1

2 release files

3.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page