Code Monkey home page Code Monkey logo

voiceapp311's Introduction

Build Status

Boston Info Alexa Skill

How to Use This Skill

You can use our skill with the Amazon Alexa stand-alone home device or with the Alexa app on your phone. You can start interacting with our skill by asking Alexa to "Open Boston Info" or starting any of your requests with "Alexa, ask Boston Info ..."

Many of the skill's responses require an address to provide accurate information. To make the skill more convenient, we will ask for permissions to use your device's location. If you prefer not to provide these permissions, you can always provide an address with your question (ex: "Alexa, ask Boston Info when is garbage day at 206 Washington Street").

Current Skill Abilities:

Find out your Voting/Polling Location

The Boston Info app can be used to find your election voting location.

Example Request:

"Alexa, ask Boston Info where do I vote for {Address}"

Get the latest information on the Coronavirus/COVID-19

The City of Boston website is providing updates for the Coronavirus and its impact on the city. The Boston Info app will get this latest information for you.

Example Request:

"Alexa, ask Boston Info for the latest information about the Coronavirus"

Find out your Trash Day

This is used to find trash and recycling pickup and collection days. You can ask for recycling or trash/garbage days specifically. It will tell you what day of the week trash is picked up from the given address.

Example Request:

"Alexa, ask Boston Info what my garbage day is."

"Alexa, have Boston Info find the recyclables collection days at {Address}"

Find out if there is a snow emergency in effect

You can ask Boston Info if there is currently a snow emergency in the City of Boston.

Example Request:

"Alexa, ask Boston Info if there is a snow emergency"

Find the nearest Emergency Snow Parking

This is used to find snow emergency parking. Given an address, it will find the nearest emergency snow parking lot by distance. It will tell you the name and address of the parking lot, as well as estimating how long it will take you to drive there. If the information is available this intent can also tell you how many spaces are in the lot, if the lot charges a fee, and what phone number to call for more information about the parking lot.

Example Request:

"Alexa, Ask Boston Info where I can park during a snow emergency.

Find any current Alerts

This is used to get any alerts for the day put out by the Boston government. The alerts can be about any of the following services:

  • street cleaning
  • trash and recycling
  • city building hours
  • parking meters
  • tow alerts

Example Request:

"Alexa, ask Boston Info if there are any alerts."

Find out the latest Three One One

This intent will give you the most recent BOS:311 reports. BOS:311 is an app where residents of Boston can report non-emergency issues like potholes or traffic light outages.

Example Request:

"Alexa, ask Boston Info what's the most recent three one one?"

"Alexa, ask Boston Info to tell me the 4 most recent three one ones"

Find any nearby Food Trucks

This intent gets near-by food trucks for the given or stored Address. It returns the first five food trucks it finds within one mile of the given address as well as the period that the food truck is expected to be at the location.

Example Requests:

"Alexa, ask Boston Info where are the nearest food trucks?"

"Alexa, ask Boston Info what's for lunch?"

Find any open farmers markets

The Boston Info app can let you know if there are any farmers markets open today.

Example Requests:

"Alexa, ask Boston Info what farmers markets are open?"

Find any nearby Crime incidents

The crime incidents intent will tell you any recently reported crimes in your area.

Example Requests:

"Alexa, ask Boston Info what's the crime activity in my area?"

"Alexa, ask Boston Info what is the crime near me?"

Leave Feedback for us!

This is used to provide feedback about the skill, including bug reports and suggestions for new intents. You can leave feedback on our skill by telling Alexa directly!

Example Request:

"Alexa, I have a suggestion for Boston Info."

"Alexa, I'd like to report a bug to Boston Info."

Intents in Development:

You can see intents that are currently in development or that we hope to develop in the future by checking out our new intent ideas page.

We are also looking for user feedback on what intents would be most helpful or would be most wanted. So if you don't see an intent you are looking for please let us know.

Want to Help Out?

Boston Info is an Alexa skill designed to provide easy access to information about municipal services in Boston.

If you'd like to contribute or learn more about what we're working on, please visit our wiki page. There, you will find basic information about Alexa's development and instructions on setting up a local version of Boston Info that you can experiment with.

voiceapp311's People

Contributors

a-camp avatar alidaniell avatar chrislreich avatar curranjm avatar endy-imam avatar eric-s-s avatar ethanstrominger avatar fords avatar giff-h avatar greengiraffe1 avatar jmartini avatar joshhw avatar jphaus avatar kly4 avatar petermarathas avatar rongood avatar saratlingamarla avatar skalmane avatar thiteixeira avatar tirthshah avatar venomouse avatar wesdrew avatar whereshj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

voiceapp311's Issues

Allow users to provide address in request

User should be able to provide their address in an information request. For example if the user's first question is the following, it results is Boston Data asking for the address:

"When is trash day for 10 Tremont St.?"

This can be done with slots provided with the intent.

Update snow parking locations

The data provided at data.boston.gov is not always up to date with correct parking locations. In addition, the parking lots often fill up so we wouldn't want to direct users to these parking lots.

We can get this real time parking data from the following ArcGIS feed:
https://services.arcgis.com/sFnw0xNflSi8J0uh/arcgis/rest/services/SnowParking/FeatureServer/0

The city of Boston is using this information at https://www.boston.gov/departments/311/snow-emergency-parking

Alexa thinks random speech is a new address

Reproduction Steps

  1. Speak or enter address utterance. Ex: "My address is 1 broadway st"
  2. Speak or enter a valid question. Ex: "When is my trash day?"
  3. Speak or enter anything else. Ex: "Blah Blah Blah"

Expected outcome:

Alexa responses that it doesn't understand the request.

Actual outcome:

Alexa thinks the random speach is your new address. In the above example, Alexa responds "I now know your address is blah blah blah."

Abstraction layer between intent code and platform-specific request/response formats

In order to easily write intents that work with multiple voice platforms, we will implement a custom data format that is able to represent requests from and responses to a variety of services.

We'll use this format in our main request handler to receive input from these services, build responses in one place, and send responses in the correct format.

When asking for address in a repromt, don't require the user ask the original question again

When a user requests something from Boston Data, such as trash day and hasn't provided an address, the resulting conversation is cumbersome:

User: "When is my trash day?"
Alexa: "I'm not sure what your address is...."
User: "My address is...."
Alex: "I now know your address..."
User: "....."
User: "When is my trash day?"
Alex: "Your trash day is...."

We should be more responsive if we have asked for additional information to fulfill a request. For example:

User: "When is my trash day?"
Alexa: "I'm not sure what your address is...."
User: "My address is...."
Alex: "Your trash day is...."

Clean up response text

We have some old user text (Ex: "Thank you for using the TrashApp skill. ") and some responses that seem overly verbose, making using the skill slow. Before initial release, we should do a review pass on all of this text.

pydoc audit

There are several doc comments throughout the project that are either incomplete, incorrect, or missing altogether. Someone should go through the project and review/update the doc comments. Any questions about specific functions or files can go to the slack channel.

Alexa often unable to accept street names with one letter, such as A St, B St, etc.

Related to #50, Alexa is not currently able to handle the two letter street names that I checked, A Street and B Street. At best, by elongating pronunciation of A Street, Alexa thinks I said "a Street" and cannot find the address. Elongating the pronunciation of B Street, Alexa thinks I said the abbreviation "B. Street" and provides incorrect information for the particular address at "B Street". try: 50 B Street, Alexa thinks T & R picked up Monday, but it is picked up on Friday. 110 P Street was identified correctly but the trash day was incorrect, Mon and Fri.

Suggest that we be able to tell Alexa "Letter A Street" or something like that.

Deploy tools on windows can't delete temp folder

When running deploy tools on Windows machines, an error is raised due to being unable to remove the created temp directory.

Creating temporary build directory ... Traceback (most recent call last):
File "deploy_tools.py", line 136, in
main()
File "deploy_tools.py", line 130, in main
package_lambda_function()
File "deploy_tools.py", line 101, in package_lambda_function
os.mkdir(TEMP_DIR_PATH)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\CodeForBoston\voiceapp311\mycity\mycity\deploy_tools\..\..\temp'

Incorporate the dialog model to streamline information collection

Currently the only piece of information we request from the user is their address (for trash day and snow parking). Right now we force the user to trigger the set address intent (in other words, we are unable to get the address unless the user says something like, "My address is ...").

Amazon provides a dialog interface that should make this interaction less awkward:
https://developer.amazon.com/docs/custom-skills/dialog-interface-reference.html

Use the dialog model so that the interaction can go something like this:
user: ask my city [intent that requires address]
alexa: please tell me your address
user: 1 main street
alexa: [response based on address]

Expand the address input intent to handle failing NLP

One thing that we've seen a lot of is the Alexa platform failing to correctly interpret more difficult street names. For instance, when we tried Everdean St. none of us could make themselves understood to Alexa no matter how clearly we enunciated.

For these situations, it would be nice to support the ability to spell your street name if Alexa is having a hard time.

Something along the lines of:
"Alexa, my street number is ONE SIX ZERO ZERO and my street name is P - E - N - N - S - Y - L - V - A - N - I - A avenue."

Refactoring intents into intent objects

There's code that's duplicated across our current intents (setting the title card, reprompt text). We could push that code into an IntentParent class and each subclass have its own logic for setting output_speech. Would people find this more confusing than how we're writing intents now?

Intent: City of Boston status

Some of the most common real time status updates have been provided by Boston at https://www.boston.gov/. These can be seen as icons with associated text towards the top of the page, with a minimum of 5 items, but sometimes more.

We should have an intent to get these statuses. This could be reading all statuses or you could ask for a specific status update.

Giving a user option to reprompt an intent for more information

For some intents the output speech can become too verbose. Instead of packing all the information that user might want into one output speech, we can give the most important information first and then prompt the user if they would like the remaining info.

Example:

Voice Assistant: "The nearest parking lot is at 115 Adams St. Would you like to know more?"

Me: "Yes"

VA: "There is a fee of $1,000 per day."

mcd naming update

per @jmartini

We should come up with more clear naming then mcd for instances of the MyCityData object. PEP8 discourages abbreviations and this doesn't really tell the user what they are supposed to be passing in. Lets brainstorm on this.

Some different streets in Boston use same names, suggest differentiate through zip codes

If this is a repeat of the issue mentioned with Tremont Street addresses, i apologize. The Trash Schedules by Address data (CSV) available from data.boston.gov sometimes contains duplicate records for what seems to be the same address, and it is not clear which days are correct. See for instance 50 Tremont St (T&R are Wednesday on one record and TH&TH for four other records, all 50 Tremont St) and 0 A St (F&F and TH&TH). No doubt there are others.

Turns out that though the README.md section Notes on open data sources for Boston. says we are using trash schedules by address CSV, the trash day intent is going out to https://recollect.net/api to get the information

Suggest we find a way to determine the correct records and do not upload the incorrect records from the data that is pulled into the skill.

explore flask-ask testing features

We currently don't have a proper way to test our alexa skill. Some people use flask-ask for this very feature. Someone should explore the implementation details in using this functionality.

Moving permits / Car Parking Intent

Moving permits are one of the causes of car towing in the city. Residents that are granted a moving permit have two days prior to the moving date to post the sign. In some cases, people that have their cars parked in one of those permit spots are not aware of the moving until their cars get towed (reasons include traveling and not using the car that frequently).

We can build a functionality that allows users to ask if there are existing moving permits on a certain street.

Moving permits are available at:
https://data.boston.gov/dataset/open-moving-truck-permits

Street Sweeping Day Intent

Add an intent that returns the street sweeping days for the street currently stored in the session.

The relevant API is here:
https://data.boston.gov/dataset/street-sweeping-schedules/resource/9fdbdcad-67c8-4b23-b6ec-861e77d56227

We should discuss what to output for this. Options include:

  • the time/day (e.g. "street sweeping is on the even side from 8am to 10am on the third Wednesday of the month")
  • the actual date of the next street sweeping day (e.g. "The next street sweeping day is Wednesday, October 18th from 8am to 10am.")

We also might want to consider whether or not we have an interface into the basic Alexa functionality so that we could do something like, "Remind me the day before the next street sweeping."

Add Boston Food Truck intent

One of the most visited pages on the City of Boston's website is the Food trucks page at https://www.boston.gov/departments/small-business-development/city-boston-food-trucks-schedule.

Add an Alexa intent which allows users who have already provided their address to ask questions such as:

  • What food trucks are available for [lunch/dinner] near me?
  • How far am I from the closest food truck location?

Sample Utterances:
GetTruckList near {address}
GetTruckLocations given {truckname}

Possible future functionality:
GetTruckTweets

Narrow vertical stripe of functionality v0:
ASK: What are the food trucks nearest to me.
RETURN: Return food trucks at location nearest to you. Assume today. Assume lunch.

Explore the possibility of keeping session open based on invocation type.

There are two main words people use to interact with a skill:

  • open ("open my city")
  • ask ("ask my city if there are any alerts")

We should look into whether we can determine from the initial request which one of those the user used to get started. Ideally we could keep the session going if it was opened with "open", and with "ask" we could close the session as soon as the question is answered.

Validate Trash Day responses

Courtney noticed that we may be responding with inaccurate information on the trash day intent. We should look into this and fix if needed.

Street Cleaning

Should be able to ask Alexa when the street cleaning is coming in my neighborhood

Update where we get trash info from

The Boston digital team stated that the trash day info at data.boston.gov is often out of date. They are currently using a 3rd party called ReCollect to manage the newest trash day info.

We should update our trash day to use the info from ReCollect. Check out https://www.boston.gov/trash-day-schedule and examine what calls they are making to the ReCollect API.

Automate deployment using CLIs

We currently have a nice deploy script for Alexa, but it does not make use of the ASK-CLI.

We should modify this tool to use ASK-CLI and make it extensible for use with Google's CLI.

This will also involve some directory restructuring.

Create common interface for intents that find closest X

Code for intents that have the goal of finding the closest X have a common flow:

  1. get information about X from some web resource

  2. process information from resource into expected format

  3. query Google Maps for the closest X to origin address

  4. format mycity_response.output_speech

I was thinking an abstract Finder object with subclasses FinderCSV and FinderGIS might be easier for us to write new intents that are location focused. These classes can use the utils modules in utilities to do most of the work but the Finder objects could make our intent code more readable.

Here's a quick and dirty UML diagram:

screenshot 2018-05-09 17 30 54

Commuter Rail Intent

Train schedules can change based on the season, day of week, and holidays. This service will provide users departure and arrival times (and other relevant info) for any commuter rail trip in the Boston area.

MBTA’s API contains this information. It can be found here:
https://mbta.com/developers

The user will specify a departure and arrival location, and the service will return the next 2 train departure and arrival times. Optionally, it will let the user add a time & date to the query. If there’s currently a delay this service will notify the user and provide the expected times of departure & arrival (as calculated and provided by MBTA’s API). It can also provide fare information.

Clean up repo and set up dev branch

It looks like we are going to proceed with Python. We need to clean up the repo so we can continue adding functionality to the skeletal skill we have so far.

Get status about a street/location

With one request the user can get all information about their street (street cleaning, trash, etc.). This combines multiple of our individual intents.

Moving print statements in functions to a logger

We're tracing what our code is doing during execution of an intent using print statements. Is there a reason we can't move these statements to a logger?

def execute_request(self, mycity_request):
        """
        Route the incoming request based on type (LaunchRequest, IntentRequest,
        etc.) The JSON body of the request is provided in the event parameter.
        """

        print(
            self.LOG_CLASS,
            '[method: main]',
            'MyCityRequestDataModel received:\n',
            str(mycity_request)
        )

AMAZON.StopIntent vs AMAZON.CancelIntent

We know that these built-in intents are important to stop Alexa from looping and trying to process everything she hears as an address, but we need a better understanding of skill's workflow.

The stop intent is straightforward, but we should have a better idea of how to use cancel so that we can write a separate handler for it in lambda_function.py.

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.