Skip to content

👧 Greta is an agile voice assistant to help reduce your carbon footprint.

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
license.txt
Notifications You must be signed in to change notification settings

protea-earth/greta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greta

Tweet

Greta is an agile voice assistant to help reduce your carbon footprint. She is built on top of the Nala framework for prototyping voice assistant apps.

Built by Protea, the world's leading social network community to reduce your effect on the climate.

Greta was built as a demo project for the Climate-KIC Climathon in the SF Bay Area October 25th, 2019.

Getting started

This section assumes you are using a Mac operating system (MacOS) on a device like an iMac / MacBook Pro.

To get started, clone the repository and install the dependencies:

git clone git@github.com:protea-earth/greta.git
cd greta 
python3 -m venv env
source env/bin/activate
python3 setup.py 

Now, set up some environment variables in your ./~ directory:

cd ~
open .bash_profile

These are some environment variables that you should set here:

export SUDO_PASSWORD=**********
export GOOGLE_APPLICATION_CREDENTIALS=/Users/jimschwoebel/Desktop/appcreds/APPNAME-basdfcnas3el98a8sd5.json

Note the sudo_password is your password for your Mac computer to help shut down computer and GOOGLE_APPLICATION_CREDENTIALS is the .json key location for the Google API to allow for Google transcription.

Now you can run:

python3 greta.py

This will start Greta up for you to now query her for some actions.

How to query Greta

It's quite easy to query Greta. All you need to do is say "Hey Greta" and she'll wake up listening for an action. See below for more information.

To active Greta, all you need to do is query her with 'Hey Greta!' (1) - which then triggers a response from Greta - (3) in this case, “How can I help you?.” Then, a user provides another query (usually after some beeping sound) - such as (4) “get events.” Greta transcribes this query to understand it, and parses the query for keyword intents; for example, if the response is “get events” the only word that really matters is “events” and that would be used to provoke a response (5). Then, after this keyword maps onto an action dictionary (or a map of responses to keywords), the action is executed (6). Then, the intent loop repeats itself, looking for another wakeword (“Hey Greta”) before triggering another action.

Actions: what Greta can do

Listed here are a description of these actions along with the query intents needed to activate them.

If you have any other ideas, let us know on the GitHub issues tab (as an enhancement)!

General actions

Action Description Example query intent
🌎 calculate_carbon_footprint.py Guides user through a list of questions then calculates the users carbon footprint (outputs in .PDF form). “calculate", "carbon", "footprint"
📅 events.py Pulls up a meetup.com event related to climate change in your local area. “events", "meetup"
📠 facts.py Grabs one quick fact from a random list of facts about climate change. “get facts", "grab a fact"
🥗 food.py Based on the query, searches yelp for vegetarian-friendly restaurants. "grab food"
🎧 music.py Pulls up a YouTube video that is inspired by climate change and global warming. "open music", "play me a climate change song"
📰 news.py Searches some basic news sites related to climate change. “grab the news”
✈️ plan_trip.py Schedules a trip based on an origin and destination city; suggests some ways to reduce your footprint while traveling. “plan trip”
💸 purchase_product.py Selects a random green vendor and an item that you could purchase to be a good environmental citizen (energy, tech, home, and fashion categories). “purchase”, "grab me a green product"
♻️ recycle.py Opens up a voice-guided earth911.com search for your nearest recycling facility (plastics). "recycle", "find me the nearest recycling facility"
💻 shut_down.py Shuts down your computer, assuming your SUDO password is in the environment variables (helps to save energy). "shut", "shut down", "down"
🗣️ speech.py Read Greta's speech from the UN Climate Action Summit "recite speech", "speech"
😴 sleep Puts the computer to sleep for a designated time period. "go to sleep"
🌡️ weather.py Searches weather.com for the current weather at your location. "get the weather"

... more to come into the future!

License

This repository is licensed under the Apache 2.0 License.

Getting involved

Here are some ways you can get more involved:

References