List

Inventing Friends: ActionCable + AVS = 3

Inventing Friends: ActionCable + AVS = 3

by Jonan Scheffler and Julian Cheal

In the RailsConf 2017 presentation titled "Inventing Friends: ActionCable + AVS = 3," speakers Jonan Scheffler and Julian Cheal explore the integration of web technologies to create innovative interactions through chat applications utilizing ActionCable and the Amazon Voice Service (AVS). This talk is designed to intrigue developers with a blend of humor, technical insights, and practical demonstrations on building a simple chatroom in Ruby on Rails.

Key points covered in the presentation include:

- Introduction of Speakers: Jonan and Julian introduce themselves and provide humorous anecdotes about their backgrounds and experiences in programming and technology.

- The Concept of ActionCable: The speakers delve into ActionCable, a Rails framework for real-time features via websockets. They showcase how it enables the creation of a massively multiplayer online chatroom (MMMOC) that works across various environments.

- Integration with Amazon Voice Services: The talk discusses how to use AVS to interact with colleagues remotely through voice commands, showcasing how Alexa can read commands and execute actions in the chatroom context.

- Demo of Building Alexa Skills: Julian demonstrates creating a simple Alexa skill using the Alexa Skills Kit to make requests and receive responses. This provides insight into how developers can leverage AWS for interactive applications.

- Real-time communication: The speakers illustrate real-time communication where voice commands trigger actions and send messages to a chatroom, emphasizing the use of ActionCable to facilitate instant feedback and interactions.

- Practical Applications: They present practical examples such as querying a database for conference schedules and obtaining build status of applications to demonstrate the usefulness of their integrations.

- Challenges and Solutions: Throughout the talk, the presenters discuss challenges faced with setting up their examples and the importance of error handling and user experience in voice applications.

- Future Perspectives: Finally, they express excitement about the potential of their work, encouraging audience engagement and participation in their innovative project called "Friendster Book Space".

The presentation effectively combines humor and technical depth, providing both entertaining and informative insights into modern web development practices. The concluding takeaway emphasizes the ease and effectiveness of integrating chat functionalities with voice services, showcasing that voice technology can significantly enhance interactive applications.

RailsConf 2017: Inventing Friends: ActionCable + AVS = 3 by Jonan Scheffler & Julian Cheal

Chatbots, ActionCable, A.I. and you. And many more buzzwords will enthral you in this talk.

We'll learn how to create a simple chatroom in Rails using ActionCable, then how to talk to your colleagues in the office or remote locations using text to speech and Amazon Voice Service.

Using the power of ActionCable we will explore how its possible to create an MMMOC: massively multiplayer online chatroom, that you can use TODAY to see your; Travis Build status, or deploy code to your favourite PAAS, let you know when the latest release of Rails is out. Using nothing but your voice and ActionCable.

RailsConf 2017

00:00:12.559 hi I'm Joe Ninh I should have warned our
00:00:17.699 friend in the back that I speak especially loud all of the time how about I actually put the slides up or do
00:00:22.710 you want to view it like this is that reply let's just play it's easier that way I'm
00:00:28.019 here to talk to you about inventing some friends I'm a friend hi friends should I go through my whole
00:00:33.329 intro and then you want to go you want to tell people who you are we only met this mystery settle for a month his name
00:00:39.390 is Julian he's from Australia good I think I'm Jonah and then I'm from
00:00:46.260 Portland which is much like Australia except not it rains more I'm the Joan and show on the internet i work at a
00:00:52.469 company called Heroku you may have heard of us we invented the color purple it's fantastic if you're wearing purple today you're welcome you have any questions
00:00:58.859 about Heroku or our color hit me up a long time ago used to make websites to
00:01:04.559 tell diabla to in-game items until they made a patch update and made my whole company illegal and then I had to find a
00:01:10.830 new job and then I made this is my daughter she doesn't suck on her toes anymore but it's by far the cutest
00:01:16.590 picture I have a friend my son hogging all the ice cream at a Costco he's adorable I used to sew cars then after I
00:01:23.340 stopped selling Diablo 2 game items and then I was a poker dealer and that is a brief history of jounin and the reason
00:01:28.860 I'm telling you all of these things is simply so you have something to ask you down the hallway because I'm leaving a lot of questions unanswered
00:01:34.140 so from talk to me hi so I'm Julian I'm
00:01:39.180 a big fan of tweed I live in the world heritage site of Bath in the UK so just
00:01:45.240 in case you're confused I don't actually live in London just want to make sure that you know that I don't live in
00:01:51.509 London I do actually live in bar and as you can see it's called bath because we basically have lots and lots above well
00:01:58.590 if you do ever come and visit the good news is I've heard some friends that stayed in some of the local hotels that we do now have showers so if you aren't
00:02:05.369 a fan of bathing you can now shower and so I work at a
00:02:10.830 small open source company called Red Hat we also sell hat which is pretty neat I
00:02:16.879 work on a project called manage IQ which manages clouds but you know here in the
00:02:23.030 desert there aren't any expired to manage so I'm not sure really what I'm going to do and I'd like to introduce
00:02:30.340 Amazon Alexa which would help if I got
00:02:35.720 my laptop out to don't um quick just rack them did I just break the
00:02:44.269 resolution of the display when I do that I want to present review so we could see the next slide this is going to be on
00:02:49.400 the video for all you watching at home the play-by-play are we ready okay go ahead ask Rosie to give her talk
00:02:56.359 introduction
00:03:03.019 come on Internet you can do it I think I can I think I can oh my if you could all stop you the
00:03:11.720 crafted scale took too long to respond okay let's try again seriously everyone turn off your phones and everything
00:03:17.660 believe you go to the next phone out aunt Rosie to get her talk introduction
00:03:24.579 sup I'm Alexa this is my star sales conference how you enjoying it it's so
00:03:32.389 hot here in Phoenix you'd think I'd be used to that being from the Amazon I loved ehh she writes the best codes and
00:03:40.340 rants so well about you started I guess they really liked tender love that I can
00:03:45.590 beat his punt any day come at me bro just joking tender love here is some
00:03:51.169 advice don't give up on your dreams keep sleeping Alexa not yet your shush we
00:04:03.889 can't say that one word that rhymes with Mexican wakes up automatically she's terrible should we talk about value yeah
00:04:10.400 yeah so the thing is we came here under a bit of a guys we told you we were coming to talk to you about one thing
00:04:16.459 what we're going to talk to you about is actually our startup surprise Julian and I are starting a company we'd like to
00:04:22.729 you all to be a part of it today is our product announcement this is your first opportunity to get on ground floor for in-store book space it
00:04:32.390 is by far the most innovative application that has ever existed I would give you some more details than
00:04:37.910 that but just know that it will improve every facet of your life anything you can think of your car your phone your
00:04:44.240 dog it will make all of those things better this is literally the future of everything this application that we've built and I'm excited peter tries today
00:04:50.630 but before we get into the details on that Julian's going to talk to us a little bit about this other thing our
00:04:56.150 third friend here Alexa actually you're going to talk afterwards
00:05:02.300 I am so yet so obviously as we're in the future now as William Gibson said
00:05:08.690 everyone is in the future saying like that we decided to use the Amazon alexis
00:05:15.020 because we're forward-thinking and so we have a variety of them here we have the Amazon tap which is the small pink one
00:05:22.540 we we have the the big old just more Amazon Alexa I can't even lift that one
00:05:28.670 that's to have an it's so small I've lost it and the tiny little that you can even just carry around in your hands
00:05:34.100 amazon.com isms and there's the rainforest edition if you go shopping
00:05:39.230 later the important feature of these two is that they have audio out so you can connect them up to all of the speakers in your home or your stereo this one
00:05:45.740 does not but you can pair it as a Bluetooth speaker to play music back through it and all of them don't Eve
00:05:50.900 over to me to the Alexus skills kit this is the magic that we are doing when we
00:05:57.110 talk to Alexa we tell Alexa to do a thing right so what Julian just did with Alexa so if you gave it a text prompt
00:06:02.390 right and that was transformed into a bit of text that we send up to the
00:06:07.910 Amazon Alexa service right the Alexis skills kit is a way for you to make Alexa say whatever you want it to say and I'm going to walk you through how to
00:06:14.360 create one of these skills in the Alexa platform I wish that we were going to do this in a terminal we're going to do it
00:06:20.030 in a GUI because this is how you set up the Alexa skills kit if there is not
00:06:25.460 actually another option for this but all of the things that I'm going to show you I'll show you an easy way to do so this
00:06:30.710 is the the page when you log in here this is your like skills information page you have to go to this page to
00:06:35.750 create a skill if you want to add something to Alexa right there's nothing on this page that is really important except for your
00:06:41.690 application ID this is something you're going to have to ship up with your information from your application because you're going to build a back-end
00:06:47.270 service to send data to the Alexa skills kit and again or to take a question from Alexa skills and give it back the answer
00:06:54.350 right so you've got this application ID I in my example I wrote an application or an Alexa skill called hal right and
00:07:02.030 the invocation name for how is how so if I talk to my Alexa and I tell how I'd tell Alexa to tell how to do a thing
00:07:08.660 then that will be sent to this particular skill and you can have as many of these as you would like right so
00:07:14.690 this skill here has an intense schema in the intense are what people will do with your things so my my scale how deploys
00:07:22.100 things deploys applications on Heroku specifically so you can tell how to
00:07:27.200 deploy Steve to production that will work in fact maybe now is a good time to
00:07:33.229 try it well I'll show you in a moment actually but this intent scheme I want to walk through a real quick this is into JSON
00:07:39.380 format okay it's not just a JSON file that you can submit up are close to an API and create but you have to go and
00:07:45.440 log into the UI and paste in your JSON and there are ruby gems that generate this JSON structure if you know
00:07:50.510 basically what you're trying to create you can use those gems to generate it or you just look at some of these examples online fill in the intents they have
00:07:57.200 these custom slot types these are types they're referenced in the schema these are the things people will say you have
00:08:03.350 chunk one chunk thing deploy Steve to production right and that allows Alexa
00:08:09.140 to extract those two pieces from my intent and just send me those so all my application has to deal with is Steve
00:08:14.990 production and I think we can all figure out where to go from there right but the piece of going from tell how to deploy Steve to production just
00:08:22.220 to speed production is harder right and that's where Alexa comes in so then you set up a couple of custom types these
00:08:28.070 are the types for mine I have an application list and environment list I have my names of my application Steve how in heaven and my my environments in
00:08:34.700 there and then you give it some sample utterson utterances to train it up so I say deploy this deploy thing in the
00:08:42.229 beginning is a little bit deceptive because that's actually the name of this skill so I'm telling Alexis like basically that first part is going to be
00:08:48.560 Alexa okay just pretend that the voice is Alexa for the purposes of this there tell our sorry how tell how to
00:08:55.680 deploy Steve to production and I give it different ways to say it right you can also say to ship Steve to production it
00:09:01.890 happens to be that deploy is the easiest one for it to recognize so do that and then you set up your end point and this
00:09:07.410 is an important step set up the end point that you want to be able to talk to you and when Alexa hears from you
00:09:13.140 this particular phrase it will post to that end point with some data and then this is where I how production
00:09:19.830 application Liz and Julianne is going to walk you through one of these generators and how to create so being an Amazon Web
00:09:26.970 service you know it likes you to create up seasonal Jason but as we're all programmers I after seein Joan and talk
00:09:34.170 last year on the legs I got very excited like fact that someone's actually written a lexer generator that will
00:09:40.710 generate these utterances for you and and that Jason so here's just a quick
00:09:45.990 example this is actually on the Amazon page there's an example of creating a
00:09:51.089 horoscope application so this is just creating that so as you can see we've got the different horoscopes life signs
00:09:58.530 and then some different days so you would sort of say you know Alexa tell me my star flying for tomorrow I'm in the
00:10:05.160 queries or something like that and that will then generate all of the data for you unfortunately this gem currently
00:10:11.610 only has a few built-in data types as you can see there's like Alexa generates a slot pipe literal but it's just a
00:10:18.120 literal string that could just be anything in the world and the date type is a type of date
00:10:23.160 so using these slot types it helps a lecturer kind of recognize the string that you are passing to it so as I
00:10:30.990 saying this gem currently doesn't support many but I do have a pull request in the works to send because Amazon has a lot of custom types it has
00:10:39.570 all of these ones and all of these ones and these ones so just just a few and
00:10:45.089 they cover everything from like TV series's to video games to weather conditions so you can kind of create all
00:10:51.900 sorts of things so so back to our code to once you've run this code that will then create you this this JSON so this
00:10:58.770 is actually the Jason I'm using today for my demo so we've got things like dates and times and talk types and
00:11:06.450 list of speakers and locations and then here are some the sample utterances that
00:11:12.060 we're going to show a demo of afterwards of the things that you can say to my
00:11:17.339 Alexa app the Alexa Voice service has
00:11:24.089 anyone used the electro voice service I'm just curious by a show of hands anyone tried to interact with this API we have a couple yes
00:11:30.990 so the issue here in particular for me is that it's an HTTP to API and I am not
00:11:38.040 smart enough to use HTTP 2 atps I actually am but when I started I was
00:11:44.190 wrong and I thought I was smarter than I was I think given 6 or 9 years I could probably get a handle on on how to
00:11:50.820 handle this interaction I am NOT going to demonstrate for you today on how an HTTP 2 API works I want to explain to
00:11:57.120 you though first why I want to use the electric voice service and what it is so in Alexa skill is I say a thing to Alexa
00:12:03.420 and Alexa says the thing back and that thing back I get to customize right but if I am going to have the Alexa be
00:12:12.690 another device for example my computer or a Raspberry Pi with a microphone and speaker on it or anything that is not a
00:12:18.480 physical Alexa device I'm going to be using the Alexa for service to accomplish those interactions so I want
00:12:24.930 to give you a little demo of my house skill real quick Alexa tell how to
00:12:31.589 deploy Steve to production how has deployed speed to production
00:12:37.310 hypothetically I'm not actually able to give you information about whether or not the deploy was successful because I
00:12:43.589 can't deliver messages to you unprompted that would actually be a terrible feature imagine if Lincoln could send
00:12:49.949 voice messages to your living rooms you'd never stop hearing about how you're getting noticed which is
00:12:58.350 fundamentally the problem for me in that that's exactly what I want I want to be able to turn on my Alexa without any
00:13:05.610 prompting and there is no such thing as a push notification for the Alexa but
00:13:11.550 there is a bit of a fancy workaround and we have found a way to do that but it is
00:13:18.209 the the electro-voice service itself that I want to demo for you today so let's talk
00:13:23.850 about that I went over here to the Electra boys service thing and I'm reading through the HTTP API and I was
00:13:28.860 like oh there's a gem for it Ilia wrote it he is so smart and I am so not smart
00:13:34.380 and I would love to be able to just like whip this up every time I find a good gem I'm excited I'm sure it's very easy
00:13:39.540 to use I'm sure lots of you have used it and I would love it if you would come up to me after this and teach me how to do
00:13:44.640 that thing that'd be great thanks so much but what I used instead is this thing that I found there's a script
00:13:50.730 right this is like a bash script I found online in a forum post after a long time of digging kind of when I had almost
00:13:56.910 given up hope on being able to accomplish this piece of this talk and something stuck out to me and it was
00:14:02.040 right here at the bottom and it was a very important part at the bottom it says v1 a lot it says v1 right on it the
00:14:10.890 HTTP to API is a v2 version of this app the version 2 API for the Alexa boy
00:14:16.980 service and guess what the the first version does not use is HTTP 2 so that was a lot easier for me to figure out
00:14:23.520 how to do that thing because I can post for days I am really good at posting I buy good as a relative term please don't
00:14:30.870 read my code next this is the actual speech recognizer that we're talking
00:14:35.880 about here there's a menacing-looking warning on the top this is an API you'll find on like the sixth or seventh page
00:14:41.550 of Google if you google version 1 Amazon Alexa voice service API documentation
00:14:46.910 that's about as specific as I could get it's buried but if you find it or you want to link hit me up you'll also find
00:14:53.160 bash scripts floating around so I basically like took this and I ported this API into like a ruby thing and so I
00:14:58.620 can post this thing things like the Omni off strategy for Amazon don't work here because when you're interacting with the
00:15:04.170 API you have to send scopes that it's not prepared good send from or other information that's not prepared most
00:15:10.200 notably also like metadata in the transfer around like a scope data tagging things if you're particularly
00:15:15.630 good at writing on the owl strategies maybe we could sit down and tear on one later I would love the right one for this or make a pull request I guess so I
00:15:22.980 have this other thing here I want to talk about which is Polly right
00:15:28.260 imagine that you say a thing right you say some text to me I'm going to send that text up to Polly
00:15:35.580 right and in that text I'm going to get it there by sending it this way Polly is
00:15:41.640 real quick in Amazon API if you are unfamiliar they announced I think last year that does a translation or a
00:15:47.160 text-to-speech and people here to Polly I guess I kind of assumed some knowledge that was unfair Polly is an API that
00:15:52.410 does text-to-speech translation using deep learning and it's brilliant it's very very good at it so when you say like I live in New York
00:15:59.520 or Saturday Night Live live and live are spelled the same way and there is no reason why a computer should be able to
00:16:05.970 tell the difference but Polly can and it can speak and I think 16 different languages which is awesome so you should
00:16:11.940 play with that API it's very well documented and easy to use so there's Polly we're going to send some stuff to Polly and how we're going to do that is we're going to put the
00:16:17.460 text into action camera okay this is where the action cable piece comes in so
00:16:22.790 what Friendster book space aside from changing the entire world allows you to do is to type some text
00:16:29.370 into a box and to send that text through action cable into the back end and that is then going to be posted over to Polly
00:16:37.020 to the Polly service and that Polly service is going to give us back in mp3 response of what we just said right so I
00:16:45.030 can tell Alexa to say anything I want right and then Alexa I will take that
00:16:50.070 text and I will send it up to Polly Polly will turn it into speech okay now I've got speech and I think and I put it
00:16:55.710 in s3 we're going to need it and I don't immediately put it into s3 because it turns out that the Alexa voice service
00:17:01.770 which is next wants a WAV file with some very specific parameters so what you do instead is you use ffmpeg in the middle
00:17:08.640 and you install a custom build pack to accomplish that and then it breaks and then you install a different custom
00:17:13.800 build pack to accomplish that and that also breaks but eventually it works and what I'm doing here is I'm taking that
00:17:20.610 mp3 file and I am taking it back to F of n bec like just backticks
00:17:25.860 out and translating it into a WAV file with like some specific bit rates and
00:17:31.050 then I send it up to s3 right and then I use that s3 to read the
00:17:36.690 file back and post it to the Alexa voice service right and the Alexa voice service sends me back in mp3 which is
00:17:41.790 the response from Alexa to arbitrary text that I just sent it right I can send arbitrary texts to
00:17:47.760 Alexa so the thing that I was explaining a moment ago is you can use this to
00:17:53.549 accomplish is that what you could do theoretically is create a skill that
00:17:59.720 does nothing just say trigger my skill triggered Joan's rad skill right and
00:18:04.770 then between the time that Alexa talks to the end point it's going to talk to you and the time that you tell it to
00:18:10.770 talk to it you get some text over there magically right you could be connected to your production instance whatever it
00:18:16.110 is you can modify the response text back to Alexa and so you can have triggers on
00:18:21.539 a server how Alexis say things unprompted which is kind of magic and it's not actually what I am
00:18:27.929 demonstrating here because it seems terribly dangerous to just let a crowd loose on that dream but I've got an
00:18:34.140 equally dangerous dream for you I promise this is what happens at the end we take this this mp3 and we actually
00:18:40.110 put a chunk of stuff back in through action cable to the front end to include it in the page and then we play other
00:18:46.380 thing right so let's talk about action cable real quick right I think you probably came to talk about action cable
00:18:52.669 it is enterprise-ready in case anyone was curious this is an example of an oppressor a to commit with some seed
00:18:58.799 users from our benevolent leader DHH the notorious b.i.g is forever immortalized
00:19:04.740 here in the enterprise ready action cable example application which is actually really useful if you're trying
00:19:09.809 to figure this out from the beginning but I'm going to walk you through it as simply as I can thank you okay action
00:19:15.750 cable people have used pub/sub are you familiar with pub/sub right we have used that thing right or I can publish
00:19:21.900 messages and other people can eat those messages right on something it doesn't really matter what that is right this was kind of like this the fundamental
00:19:28.260 basis for what we're about to create so normally when I ask a server for a thing right my browser is like sin right is
00:19:35.340 the first thing that they send a little packet right so let's try it does anyone know what the next packet back is if I said skin what would you say act okay
00:19:42.809 close syn/ack I didn't know that either I thought it was act 2 but act is what I'm supposed to say to the act if you're
00:19:49.409 a networking engineering you think I'm wrong please tell me why I just made bad slides because I'm very interested to have found that thing but anyway that's
00:19:56.850 how a typical response goes right I'm like a sinker you see me and the computers like SCU
00:20:02.190 right and then we're good and then I send a file but that's it that's the end of our interaction right so a WebSocket is an alternative to that style of
00:20:08.730 connection where I do a little dance and throw something is a little bit more like this we're just screaming at each
00:20:14.850 other all the time it's just more screaming okay I scream and they scream and we're all screaming
00:20:20.970 all the time it's very peaceful arrangement so there are four major
00:20:26.550 components to setting up an action cable thing right the first is the connection which is going to be inside your rails
00:20:32.010 application on the server side the next one is the channel this is so that you can have different ways right look Jenny
00:20:38.340 buddy remember these TVs when I was a cadet like five channels they always spoiled you you had so many channels you like gave up on channels altogether and
00:20:44.520 you're like Netflix man I'm going to use channels anyway channel is just like a channel on your television right you got
00:20:50.100 one two three four five right so I send things over one and I can have people listen to one or two or three right not everyone's watching the same TV show all
00:20:55.770 the time look at me I'm a broadcaster then you have a consumer okay
00:21:00.960 consumers little piece that sits in your browser and it consumes a thing right it eats up all the stuff on all of the channels right and you can create a
00:21:08.690 subscriptions to specific channels you can turn your TV to the not you want you can actually turn your TV to a lot of
00:21:15.450 notches it's like the little picture-in-picture feature the analogies breaking down but you can do a lot of
00:21:21.630 channels at the same time as many subscriptions as you want so I'm going to show you some code to do that real quick okay this is how you create a
00:21:27.780 subscription in this case I'm create a subscription to the deployment channel right when a message comes over a dis
00:21:34.770 deployment channel sending me some text I'm going to perform this action this deploy action over here with that text
00:21:41.340 and that deploy action is defined here in my channel right there's my action deploy it gets some text I log its and
00:21:48.870 then I take the text and I put it into a deployment right to respond to it and that's going to kick off my whole back
00:21:55.140 end but it's a way fundamentally they're taking these two components on this side and these two on this side and shooting things over the wire between the browser
00:22:00.900 and the server right the front end and the back end so then when I want to send things back out here I'm broadcasting to
00:22:07.020 the server on a particular channel this is the deployment responses Channel I said you could have multiples this is a
00:22:12.100 one right and I put the text onto the deployment responses channel which is the text you heard earlier from Alexa she had that big diatribe Alexa heard me
00:22:19.630 say deploy how to Steve to production and it sent that to my back end and the back end generated the text response
00:22:25.120 using that little action table deal there and send it back out okay and then we're streaming from the deployment
00:22:30.580 responses so the application that we are here to show you today a little bit
00:22:35.890 different than this particular version this is a what happens when you receive the data on the deployment response and
00:22:41.620 then in the front end JavaScript you can do speech synthesis on that kind of thing you can actually use that skill that I just wrote in a browser which is
00:22:48.429 the point of using action cable for this thing for doing the thing where you talk to Alexa you don't need anything like that right but I wanted to behind people
00:22:54.940 be able to talk to their web browser and get it to do things and that's what the house stuff does so that was a lot of
00:23:01.570 words that I apologize but Julian's going to talk to you about something different so you can start hearing again not just my droning all right all right
00:23:08.320 now faxes encode right so this is railsconf obviously so for that we've
00:23:13.630 made alexa on Rails so following on from the other gem earlier that would generate the utterances and the JSON
00:23:22.150 file when your service actually receives the payload from the Alexa you need to
00:23:27.549 be able to handle that and then give a response back and again it's lots and lots of artisanal Jason so there's
00:23:33.130 another gem that you should all go and download called Alexa Ruby kit and this
00:23:38.740 is super super simple so just in your in your in your rails controller you just
00:23:44.200 create a new instance of a lexer ruby kit response and then you just need to
00:23:49.780 generate the string as you can see my method I call here is which demo am i calling and in that I pass in the Alexa
00:23:57.640 variable which contains all of those keywords from the assurances like the talk the speaker the day and then I've
00:24:05.440 just basically got a massive if statement that kind of works out like if this text was this then I must reply
00:24:11.230 with this and so then you get all of that and then you go down to the Alexa type so this was just an intent request
00:24:18.190 as in a user was asking for something and then you have my the session end which Alexa senses itself automatically
00:24:24.280 is like okay I've finished now with the require there are other elective types you can use like you can say Alexis stop no
00:24:29.590 Alexis stop Alexa stop if any of you have ever used the lecture to like maybe
00:24:34.690 play some music or set an alarm normally you have to shout stop quite a lot to it that's where you would put that in this
00:24:41.169 Alexa type that would handle that response so then you could reply with something back like oh sorry my bad as
00:24:47.889 well as generating that this also creates the title card so in the Alexa app you can see what the request was
00:24:54.460 that you sent and so you can see here this is in the Amazon Alexa app it's got the title card of electron rails at
00:25:00.999 railsconf and it LexA heard me ask Rosie who is speaking at 11 a.m. today and
00:25:07.299 then you can actually reel it in to your voice again which is super fun just to make sure and then you can tell Amazon's
00:25:13.149 like no Alexa somehow burnt the toast I wanted to know what time it was so as
00:25:18.219 you can see my robot is for Alexa is called Rosie aptly named after all my
00:25:23.619 favorite robots which is Rosie from the Jetsons cool right so now you've heard
00:25:28.989 about action cable you've heard about Alexa I think maybe it's time for some demos ship it ship it do you want to
00:25:39.190 load up oh I don't want to know about it you know you didn't see anything okay no Julie are you going to talk to
00:25:44.799 your thing and you show them the filth we've got 15 minutes actually maybe we'll go what do you want to do some
00:25:51.039 download yeah do this one yeah right so and I took the schedule from the
00:25:56.739 conference and I put that into a rails app that's running on the client and so
00:26:03.279 when I talk to like that it can then go query the rails database and hopefully come back with an answer so let's see
00:26:10.440 ask Rosie which room is tomorrow keynote
00:26:16.259 sorry couldn't find a thing let's try that again she really hates Austrians
00:26:22.299 and hang of it why workday again so that was so one thing you have to do in your code is actually handle errors and things
00:26:30.279 otherwise Alexa doesn't really know what to say so that was it not be able to find anything in the database let's try
00:26:35.499 a another query and ask Rosie who is speaking at 11:40 today
00:26:48.220 ask Rosie who is speaking at 11:40 a.m. today well we have Christine Nelson and
00:27:00.170 certain times securing rails absent user data polish and off
00:27:05.270 Tyrion Kovac Shawn mafia Ferrum a panel developer happiness through getting
00:27:11.240 involved Jake were observing change a gold master testing practice just in
00:27:17.300 Vice a deep dive into sessions by daily Joshy Goldilocks and the three code reviews
00:27:23.200 overall a pretty decent lineup I think you should see polish and off tyrion
00:27:28.790 Kasich Shawn mafia Sara Mays talk really
00:27:34.640 if you will even recommend things to you I went around with Australian because that is really hard to do that thing
00:27:39.800 that just happened it's not actually that simple hit all screws II give
00:27:44.960 details of Erina talk sorry didn't find
00:27:50.540 a thing you have to try that again any of you thinking about being speakers in the future no like don't do the live
00:27:55.700 demos okay this is a terrible Oscar Rosie give details of Erin talk some I
00:28:04.820 couldn't find a thing so I try to remember though I know it sets a British oh it is said the British piston ask
00:28:13.130 Rosie give details of Erin's talk sorry
00:28:19.190 didn't find a thing like and let's try this again I have been judged and found wanting
00:28:24.230 apparently not for additional which why that one one more plug for the only annoying things like how I'm working I had to do apostrophes with the Alexis oh
00:28:30.560 so it's like that boy Marin and not Erin's let's try one more time ask Rosie
00:28:35.810 give details of Erin talk ah okay I
00:28:42.160 surrendered however ask Rosie who is speaking at 12:20 p.m. today in exhibit
00:28:49.160 hall
00:28:54.309 giving up there it is it's quit us okay that's fine last time ask Rosie who is
00:29:02.210 speaking at 12:20 p.m. today in exhibit hall such head sight looks like it's
00:29:09.409 time for lunch so as well as like
00:29:15.590 talking to the conference schedule to find out you can actually do some useful things for work so you can hook it up to
00:29:23.720 like any API that you like ask Rosie what is Rails build status they call me
00:29:34.039 mellow yellow' the build is still building so there are practical
00:29:40.609 applications for this and and with a decent Wi-Fi connection that is not me
00:29:46.039 tethering from inside a concrete box and you know a little more robust handling is maybe not like a demo version but
00:29:51.950 something like you can actually use this to do things I have used this to deploy applications El Gracie hot the
00:30:04.279 Replicators on this vessel are not yet operational electors are really good at
00:30:10.519 jokes we got it again I'm going to combine yeah good iris this one I would
00:30:17.299 like to welcome you all to the Future there is a application here for your viewing enjoyment called Friendster book
00:30:23.269 space Heroku app comm and as you're heading here I would like to point out
00:30:29.059 that this is a chat room being presented that a railsconf talk that is very well bound under the code of context so
00:30:34.849 behave yourselves there's anything inappropriate I am burning it down and breaking my computer and coming to find
00:30:40.549 you and I have more information about you than you think we're using a real name service the Google auth more than that
00:30:46.279 WebSockets can give you a lot I'll give you some details later so let's look over here at Friendster
00:30:54.080 book space on this screen though like that the future of everything the first
00:30:59.779 day I machine learning dialog system to leverage IOT home automation and voice recognition WebSocket technologies on a continuously integrated path to anyone
00:31:05.620 see massively multiplayer online chatroom are you excited who wants to hug the future should I do
00:31:10.900 it alright it's not on the screen are you serious I was just reading a thing you're like looking at my like garbage
00:31:18.279 files why are you doing that instead of what I want you to do now you can see oh
00:31:27.630 my gosh now you know I have a messy desktop that's like the most shameful thing a programmer can have I feel like
00:31:33.370 right okay I'm going to try again I was just reading this text here it's not that exciting I'm not going to read it
00:31:40.240 again because it was kind of hard the first time but I will invite you to hug the future which out of context doesn't
00:31:46.149 make any sense but as you can see I've cleverly named the login button hug the future so you click here it's going to
00:31:51.700 offer you with my google thing here I will choose to not use this browser
00:31:57.190 first of all because that would be a poor choice I apologize to that but I'm
00:32:02.440 here on the Friendster book space and look at that I am logged in magic Wow how'd that happen now you don't have
00:32:08.289 any characters or my passwords so I can go right in to the future here by
00:32:14.320 clicking this and I've got a chatroom and look at people talking in the chatroom already it's so exciting right it's a real live
00:32:20.350 chat room use it action cable we finally find a use for action cable and it's basically making slack hi mom dresser
00:32:28.390 yeah it's a future the future of slack and I want to show you why real quick
00:32:33.690 because I can say things like this maybe
00:32:40.240 oh no that's not what we wanted to do did it just okay
00:32:46.860 how about this now I want to do this please do a thing why are you doing that
00:32:53.919 because people are typing is that really a bug I just introduced it please stop
00:32:59.140 typing okay you got nothing from hello
00:33:06.159 wheels conference oh look at that we just chatted to Alexa and to show
00:33:15.190 some joined up thinking hopefully when I speak to this Alexa that should also go
00:33:20.499 in the in the chat room ask Rosie what is Rails build status I'm elected with
00:33:33.759 my first real that's perfect it wasn't quite what I wanted but it went great what a ghost relaxer so now
00:33:42.129 hey can you speak to your Alexa from text you can also do it from with your voice and then you can talk to your
00:33:47.979 colleague so this is a remote workers dream yes it's why we all work from home
00:33:54.909 in the first place is to talk to our colleagues John and Schaeffler asks what
00:34:01.119 do you want to be when you grow up right now I'm a translating mp3's to where files on I want to be the computer from
00:34:06.460 Star Trek this is a good answer Thank You Alexis you can ask Alexa things you
00:34:12.369 can say things all of the things that you ask Alexa to say and ask will happen in your own browser so the audio is
00:34:19.240 played back through me embedding an audio element that has the s3 mp3 link
00:34:24.250 in it that can then be played in the browser you can also implement features yes alexis has got excellent jokes you can
00:34:31.210 also implement features that would allow you to tell other people and so those channels that I was talking about creating earlier there is one broad
00:34:37.450 channel here that is the messages channel that we're working through you people post questions and things generally in that channel and then each
00:34:43.750 user has their own channel right so I could hypothetically have implemented a feature that would allow me to have
00:34:50.109 Julian's computer say a thing raise your hand if you didn't has a good idea in a live demo though you're wrong actually
00:34:56.619 incorrect totally incorrect you could also implement a thing that iterated through all the users and sent to each
00:35:01.720 of their channels anything you wanted and I could send audio to all of your devices if you were the sorts who all
00:35:07.809 had your laptops open in the volume turned up way high right now I could blast you out with an mp3 I'm just kidding I'm not going to do that
00:35:13.329 but that would be something you could do with this type of thing so the the channels give you a lot of flexibility
00:35:19.750 and a lot of power action cable is a fantastic tool let's hop back over here very quickly and I'll
00:35:26.680 do this and it worked and you can see that do you see my dirty desktop spell
00:35:33.780 confreaks go ahead and cut the desktop from the video let's see how we can find
00:35:40.570 our and Foulke again well let's do it do errands Katya Oscar OC give details of
00:35:46.390 Aaron talk so I couldn't find a thing
00:35:52.170 let's try that again we invite you to try on your own and find Julian in the hallways and try
00:35:58.180 talking to his Electra in your best British accent is that you can actually set the voice that it expects and the
00:36:03.280 thing where I was talking about Polly earlier having 16 different languages you could very easily change this chat room code to send Japanese text and say
00:36:11.080 Japanese text and it's very good so go and play with Polly if you know how to
00:36:16.780 http - please teach me also the other Amazon API documentation the v1 stuff is
00:36:21.880 very deep but I can help you find it if you need a link hit us up anytime we're