House Taken Over for Amazon Alexa

House Taken Over floor plans

House Taken Over is a short story by Julio Cortázar. Using the architecture implied in the text, I have developed an interactive journey for Amazon Alexa to be presented in a technology and literature seminar at Café Cortázar on May-2017

For this project I have used Amazon Lambda and Python programming code.

House architecture has been defined into a json file with the following format

“contents”:”Enameled tiles, wrought iron door”
“name”:”Living room”,
“contents”:”Tapestries, sofa, coffe table, rug and a lamp”
“name”:”Narrators bedroom”,
“contents”:”Lamp, bed, cabinet, stamps and 15000 pesos”

Here is the piece of code in charge of house navigation

if str(direction)!=’’:

# iterate through current room available directions
for myDirection in directionsArray:
if str(myDirection[:1])==’r’:
availableDirections += ‘ right’
if str(myDirection[:1])==’l’:
availableDirections += ‘ left’
if str(myDirection[:1])==’f’:
availableDirections += ‘ forward’
if str(myDirection[:1])==’b’:
availableDirections += ‘ backward’
# compare first letter of direction — to remove room — with first letter of speech which is a complete word like forward
if str(myDirection[:1])==direction[:1]:
# now get the other part: room number

if goesTo==0:

# search available directions
speech_output = “You cannot go in that direction. Available directions: “ +availableDirections
session_attributes = {“currentRoom”: currentRoom}

if goesTo>0:
speech_output = “Going to “ + str(data[str(goesTo)][‘name’])
# set new room in session
session_attributes = {“currentRoom”: goesTo}
speech_output = “You should also say the direction. Example go forward”
session_attributes = {“currentRoom”: currentRoom}

The link to enable House Taken Over for Amazon Alexa is

Writer :: Maker :: Musician

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store