Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AIY Project, la rebelión de las cajas

AIY Project, la rebelión de las cajas

Charla sobre AIY Project dada en el GDD Extended del GDG Córdoba el día 28 de Octubre de 2017

David Sánchez Jiménez

October 28, 2017
Tweet

More Decks by David Sánchez Jiménez

Other Decks in Programming

Transcript

  1. Google Home/Mobile device — The surface to interact with the

    Assistant. The Google Assistant — A conversation between you and Google that helps you get things done in your world. Actions on Google — How developers can extend the assistant (via Assistant apps)
  2. Well, it’s kind of cold outside, so I'd like something

    to warm me up, like a hot soup, and I want it fast. I have some chicken, and also canned tomatoes.
  3. Ok Google, talk to Personal Chef Well, it’s kind of

    cold outside, so I’d like... Sure, here’s Personal Chef What are you in the mood for? What protein would you like to use? Speech to Text NLP Knowledge Graph ML Ranking User’s profile Text to Speech Speech to Text Text to Speech ... Invoke Personal Chef action Parse query and generate response
  4. “ Intent Matching — Match and categorize user utterances to

    an intent. Entity Extraction — Identify key words and phrases spoken by the user. @
  5. Ok Google, talk to Personal Chef Well, it’s kind of

    cold outside, so I’d like... Sure, here’s Personal Chef What are you in the mood for? What protein would you like to use? Speech to Text NLP Knowledge Graph ML Ranking User Profile Speech to Text Text to Speech ... ... ... Trigger WELCOME event ... NLP: Intent Matching Entity Extraction
  6. const app = new ApiAiApp({request: request, response: response}); const WELCOME_INTENT

    = 'input.welcome'; // the action name from the API.AI intent const NUMBER_INTENT = 'input.number'; // the action name from the API.AI intent const NUMBER_ARGUMENT = 'input.mynum'; // the action name from the API.AI intent function welcomeIntent (app) { app.ask('Welcome to action snippets! Say a number.'); } function numberIntent (app) { let number = app.getArgument(NUMBER_ARGUMENT); app.tell('You said ' + number); } let actionMap = new Map(); actionMap.set(WELCOME_INTENT, welcomeIntent); actionMap.set(NUMBER_INTENT, numberIntent); app.handleRequest(actionMap); Node.js Client library https://github.com/actions-on-google/actions-on-google-nodejs
  7. Node.js Client library https://github.com/actions-on-google/actions-on-google-nodejs const App = require('actions-on-google').ApiAiApp; exports.yourApp =

    (request, response) => { const app = new App({request, response}); console.log('Request headers: ' + JSON.stringify(request.headers)); console.log('Request body: ' + JSON.stringify(request.body)); // Fulfill action business logic function responseHandler (app) { // Complete your fulfillment logic and send a response app.ask('Hello, World!'); } const actionMap = new Map(); actionMap.set('<API.AI_action_name>', responseHandler); app.handleRequest(actionMap); };