Giter VIP home page Giter VIP logo

googlecontroller's Introduction

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")

#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
#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 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

googlecontroller's People

Contributors

dray-cyber avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.