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

Points of VUI apps from implementing to releasi...

Yoichiro Tanaka
April 12, 2018
92

Points of VUI apps from implementing to releasing after designing it

Yoichiro Tanaka

April 12, 2018
Tweet

Transcript

  1. Points of VUI apps from implementing to releasing after designing

    it Yoichiro Tanaka, Google Developers Expert
  2. Yoichiro Tanaka Software Engineer / IT Architect Google Developers Expert

    (Web) twitter.com/yoichiro google.com/+YoichiroTanaka
  3. What does describe in this doc File points while developing

    the "Bulls and Cows" number-guessing app as an app for Google Assistant. • Points while designing • Points while implementing • Points at submitting for a review
  4. Tools for Design Currently, most nothing's tools for VUI designing.

    • Many companies and communities are finding a way. Many tools might be provided from now. • We don't have any tools, but we need some tool to design VUI apps. It is necessary to find some method by own (or refer to recommendations on Actions on Google)
  5. My method 1. Write scenarios. 2. Find contexts. 3. Draw

    navigation between contexts. 4. Find intents, and add them to the context navigation. 5. Apply each dialog before and after each intent.
  6. 2. Find contexts Search for a place where the theme

    of the conversation changed. Then extract before and after change as "context". • "Listen to a three-digit number, and answer the judgment result" • "After answering correctly, ask whether play again one more time" • "After three mistakes, ask whether want to hear the hint"
  7. Happy Path - The theme changed from "Now, gaming" to

    "Ask whether plays again" -> The context changed.
  8. Help - Heard the help in "Gaming", but the theme

    not changed from "Gaming". As the result, the context is still "Gaming".
  9. Mistakes 3 times - By mistaken 3 times, the theme

    changed to "Asking to hear a hint". That is, the context changed.
  10. "Now gaming" "Ask whether play again" "Ask whether want to

    hear a hint" Can understand an abstract of the conversation stream by drawing navigation between contexts.
  11. 4. Find intents Find user's "intents (= declaration of intent,

    requirements)". • "Context" is for apps a bit. • "Intent" is for users.
  12. Can understand an abstract of a stream of the conversation

    by drawing a chart of changing contexts.
  13. Ex: Insert intents and apply dialogs between the "game" context

    and the "hear_hint" context. 789 1 Bull 0 Cow. Do you need a hint? Yes The sum of three digit numbers is 16.
  14. Ex: Insert intents and apply dialogs between the "game" context

    and the "hear_hint" context. 789 Hint 1 Bull 0 Cow. Do you need a hint? Yes The sum of three digit numbers is 16. The sum of three digit numbers is 16. I see. Please say three digit numbers. 1 Bull and 0 Cow I didn't understand well. Please say three digit numbers. No 123 ??? * Rounded corners are Context, Rectangles are Intent.
  15. Scenarios • Google SpreadSheet VUI design starts with scenarios VUI

    design • Google SpreadSheet • UML: State-chart diagram • UML: Activity diagram
  16. Points during implementing • Mapping VUI design to Dialogflow •

    Find actions from intents, and create a implementation code • Can end a conversation anytime
  17. 789 1 Bull and 0 Cow. Do you need a

    hint? 1イート0バイトです。 Congratulation! You got three Bulls! Do you want to play again? Training phrases Input context Output context Response Intent
  18. Find actions What one response is decided against one intent

    is rare. The response will be changed dynamically depending on user's phrases, contexts and app's statuses. → Fulfillment decides them. • Output contexts • Response To specify a process to the fulfillment, define actions.
  19. Fulfillment The target code which developers write is this fulfillment

    code. • Can use something which can handle HTTP and JSON. • Generally, actions-on-google-nodejs for Node.js is used. ◦ https://github.com/actions-on-google/actions-on-google-nodejs • Fulfillment has an affinity for Cloud Functions. ◦ GCP/Firebase Cloud Functions (Free plan can be used if no external API accesses) ◦ Other alike solutions should also be no problem.
  20. const DialogflowApp = require("actions-on-google").DialogflowApp; const ACTION_INPUT_WELCOME = "input.welcome"; exports.fulfillment =

    (req, res) => { const app = new DialogflowApp({request: req, response: res}); const inputWelcome = app => { app.ask("Hello, this is ***. ..."); }; const actionMap = new Map(); actionMap.set(ACTION_INPUT_WELCOME, inputWelcome); app.handleRequest(actionMap); }; This is a template code for Fulfillment.
  21. The code which is used to decide the response. //

    Continue the conversation, and say a next phrase from the user. app.ask("Great! You got three bulls. Do you want to play again?"); // Specify re-prompts as 2nd argument for when the user doesn't say anything. app.ask( "Great! You got three bulls. Do you want to play again?", ["Sorry, I can't hear you well. Play again?", ...] ); // End the conversation app.tell("I see. See you again.");
  22. The code which is used to decide Output Contexts //

    Specify the output Context. const CONTEXT_PLAY_AGAIN = "play_again"; app.setContext(CONTEXT_PLAY_AGAIN, 1); // The value "1" is for Lifespan // Delete the input Context const CONTEXT_GAME = "game"; app.setContext(GAME, 0); // Deleted by specifying "0"
  23. The code which is used to keep information via multiple

    conversations. // Keep information within the conversation session. app.data.answer = "123"; // Keep information for a next conversation after ending the conversation. app.userStorage.answer = "123";
  24. const inputNumber = app => { const number = app.getArgument("number");

    const answer = app.data.answer; if (number === answer) { app.setContext("game", 0); app.setContext("play_again", 1); app.ask("Bingo! Do you want to play again?"); } else { app.setContext("game", 1); app.ask("1 bull and 0 cow."); } }; Actual code sample.
  25. Must respond within 5 sec. Currently, cannot respond multiple times

    at once. Points of implementing Fulfillment
  26. Must be able to end the conversation by the user

    in all contexts. → In the review process, the reviewer will confirm whether the conversation can be ended by the phrase "Finish". → Note that the reviewer may reject the application because the reviewer cannot end the conversation with the phrase in the context answering "yes" or "no" with app.askForConfirmation()... Can end the conversation anytime
  27. Registration of app information • App name, pronunciation • App

    description • Image, icon • Invocation phrases • Developer information • Privacy policy, Terms of use • Category • Other... Basically, need to register information to satisfied the page of the right image.
  28. App name Recommend that should confirm whether your app can

    be invoked with the app name by Google Assistant as your expectation in advance. → Try calling the app name on Google Assistant, and know the text recognized by the assistant. → And, app name is first come, first served.
  29. Image, icon The small icon is "rounded corners" icon. →

    Should design the icon which all corners will not be drawn.
  30. Invocation phrases The reviewer confirms the app actually can be

    invoked with all registered phrases. → Also, on all devices. If not invoked, the application will be rejected. Especially, it is important to confirm Implicit Invocation on all devices.
  31. Privacy policy, Terms of use It seems that the content

    of them is not checked well at the review. → However, it is important to protect me, therefore you must write them with responsibility. The review checks whether "a correct app name" is written in them.
  32. Conclusion To design, implement and release smoothy your app for

    Google Assistant, you need to know below described in this material in advance: • Points during designing • Points during implementing • Points at submitting for a review