Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Construindo projetos para o Google Assistant - I/O 2019 Recap São Paulo

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 72 Anzeige

Weitere Verwandte Inhalte

Ähnlich wie Construindo projetos para o Google Assistant - I/O 2019 Recap São Paulo (20)

Weitere von Alvaro Viebrantz (20)

Anzeige

Aktuellste (20)

Construindo projetos para o Google Assistant - I/O 2019 Recap São Paulo

  1. 1. CONSTRUINDO PROJETOS PARA O GOOGLE ASSISTANT Alvaro Viebrantz aviebrantz.com @alvaroviebrantz
  2. 2. Alvaro Viebrantz @alvaroviebrantz aviebrantz.com Google Developer Expert for IoT Product Engineer @ Leverege Organizador do GDG Cuiabá e DevMT
  3. 3. Um número crescente de dispositivos
  4. 4. COMO ISSO FUNCIONA? Design Develop Discover
  5. 5. Google Home/Mobile device — A superfície para interagir com o Google Assistant. The Google Assistant — Uma conversa entre você e o Google que te ajuda a realizar uma atividade no seu dia a dia. Actions on Google — Como desenvolvedores podem extender o Google Assistant (com Assistant apps)
  6. 6. COMO FALAR COM PLANTAS
 🌱🛠🗣
  7. 7. How are you feeling ? How is the weather ? Turn on the water. Turn on the light.
  8. 8. 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 Text to Speech Speech to Text Text to Speech ... Invoke Personal Chef action Parse query and generate response
  9. 9. How are you feeling ? How is the weather ? Turn on the water. Turn on the light.
  10. 10. Are you ok ? Do you need something ? Are you feeling a positive vibe around you ? It’s time to drink some water. You can take a sun bath.
  11. 11. “ Intent Matching — Relacione e categorize o que o usuário diz com alguma intenção. Entity Extraction — Identificar palavras chaves e frases ditas pelo usuário.@
  12. 12. 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
  13. 13. BRAÇO ROBÓTICO
 🤖💪🗣
  14. 14. Mover 30 graus na base. Colocar base em 30 graus. Abrir garra. Fechar garra. Pegar objeto. Mover para frente.
  15. 15. Mover 30 graus na base. Colocar ombro em 100 graus. Abrir garra. Fechar garra. Pegar objeto. Mover para frente.
  16. 16. ● Time ● Date ● Time Period ● Number ● Cardinal ● Ordinal ● Temperature ● Speed ● Volume ● Weight ● Age ● Currency ● Country ● Location ● Language ● Artist ● Music ● …. Entidades de sistema
  17. 17. Respostas
  18. 18. Fulfillments
  19. 19. !32
  20. 20. !33
  21. 21. PROCESSAMENTO DA CONVERSA
  22. 22. Assistant app { conversation api request } { conversation api response } Entrada do usuário Resposta do app
  23. 23. PROGRAMAÇÃO ORIENTADA A EVENTOS
  24. 24. NODEJS PYTHON GOLANG
  25. 25. QUALQUER COISA ( DOCKER )
  26. 26. 40
  27. 27. 41
  28. 28. 42
  29. 29. 43
  30. 30. DE UM APP PARA UMA EXPERIÊNCIA
  31. 31. Preserve e reforce sua personalidade ao se relacionar com o usuário como se fosse algo separado do Google Assistant. Tome conta do fluxo. Hey! This is ___ Welcome to ___ Ready to play ____ Hi! ___ here. Hello. I’m ___ Greetings, human. Welcome back to ___ Hey again. ___ Let’s play ___ Here’s your ___ Brought to you by ___ Hi there, ___ Let’s get started. Ready for your ___ ___, here to… Live from ___ This is ___ What’s up, ___ and more...
  32. 32. <speak> <!-- Must be at the start of the string --> <say-as interpret-as="characters">SSML</say-as> <break time="3s"/>. <audio src="https://example.com/file.mp3"></ audio> <say-as interpret-as="cardinal">10</say-as>. <say-as interpret-as="ordinal">10</say-as> <say-as interpret-as="characters">10</say-as>. <sub alias="World Wide Web">WWW</sub>. <p><s>This is one.</s><s>This is two.</s></p> </speak> <!-- Must be at the end of the string --> “S S M L” [3 second pause] [audio file plays]
 “Ten” “Tenth” “One Oh” World Wide Web [two sentences] Reforce com SSML: Speech Synthesis Markup Language https://developers.google.com/actions/reference/ssml
  33. 33. function welcome (app) {
 return isPreviousUser(app.getUser().userId).then((userHasVisited) => {
 if (userHasVisited) {
 app.ask(`Welcome to Number Genie!...`, NO_INPUT_PROMPTS);
 } else {
 app.ask(`Hey you're back...`, NO_INPUT_PROMPTS);
 }
 });
 } Reforce com armazenamento e memória do seu Assistant App developers.google.com/actions/assistant/best-practices
  34. 34. DESENHE PARA MÚLTIPLAS SUPERFÍCIES
  35. 35. AUDIO_OUTPUT SCREEN_OUTPUT Dê suporte a múltiplas superfícies developers.google.com/actions/assistant/surface-capabilities
  36. 36. function simpleResponse (app) {
 app.ask({
 speech: 'Howdy! I can tell you fun facts about ' +
 'almost any number, like 42. What do you have in mind?',
 displayText: 'Howdy! I can tell you fun facts about ' +
 'almost any number. What do you have in mind?'
 });
 } O texto deve ser um subconjunto do audio Suporte a voz e texto developers.google.com/actions/assistant/responses
  37. 37. function suggestionChips (app) {
 app.ask(app.buildRichResponse()
 .addSimpleResponse({
 speech: 'Howdy! I can tell you fun facts about ' +
 'almost any number like 0, 42, or 100. What number do you have ' +
 'in mind?',
 displayText: 'Howdy! I can tell you fun facts about almost any ' +
 'number. What number do you have in mind?'
 })
 .addSuggestions(['0', '42', '100', 'Never mind'])
 );
 } Guie o usuário (chips de sugestão) developers.google.com/actions/assistant/responses
  38. 38. function basicCard (app) {
 app.ask(app.buildRichResponse()
 .addSimpleResponse('Math and prime numbers it is!')
 .addBasicCard(
 app.buildBasicCard(`42 is an even composite number. It ` +
 `is composed of three distinct prime numbers multiplied together. It ` +
 `has a total of eight divisors. 42 is an abundant number, because the ` +
 `sum of its proper divisors 54 is greater than itself. To count from ` +
 `1 to 42 would take you about twenty-one…`)
 .setTitle('Math & prime numbers')
 .addButton('Read more')
 .setImage('https://example.google.com/42.png', 'Image alternate text')
 )
 );
 } Mostre cards básicos developers.google.com/actions/assistant/responses
  39. 39. Usado para seleção fácil <10 items Usado para comparação <30 items Listas e Carrosséis para seleção developers.google.com/actions/assistant/responses
  40. 40. CONHEÇA O USUÁRIO
  41. 41. Peça informações Google Home Mobile Device NAME Registered device user’s full name Registered device user’s full name DEVICE_COARSE_LOCATION Zip code and city N/A DEVICE_PRECISE_LOCATION Coordinates and street address Coordinates Q: "Recommend me a local bookstore" 
 A: "To find bookstores near you,
 I'll just need to get your zip code from Google. Is that okay?" conv.ask(new Permission({
 context: 'To find bookstores near you', permissions: 'DEVICE_COARSE_LOCATION', })); developers.google.com/actions/assistant/helpers#user_information
  42. 42. Integração transparente com Google Sign-in Associe uma conta de usuário com seu backend com OAuth2 developers.google.com/actions/identity/
  43. 43. Account Linking developers.google.com/actions/identity/ Multi plataforma Google Sign In + OAuth linking Assistant apenas Google Sign In apenas
  44. 44. •Monte pedidos •Use meios de pagamento fornecidos pelo Google •Use seu próprio processador de pagamentos (Stripe, Braintree, Vantiv, e mais por vir) •Atualize o status do seu pedido Transações com o usuário developers.google.com/actions/identity/
  45. 45. What is the temperature inside? Turn off all the lights. What lights are on in the living room? Make it warmer. How many lights are on? Smart Home developers.google.com/actions/smarthome/ Execution path for home automation Dim the lights in the living room a little bit.
  46. 46. condições do dia a dia do usuário {
  47. 47. “Eu não te entendi”
  48. 48. Quando um então chamado “erro” ocorrer em uma conversa, ele deve ser tratado simplesmente como um novo turno no dialogo, mas com palavras e condições diferentes.
  49. 49. Usuários tem intenções e objetivos
  50. 50. COMO COMEÇAR ?
  51. 51. g.co/dev/ActionsDesign
  52. 52. developers.google.com/actions
  53. 53. OBRIGADO Alvaro Viebrantz aviebrantz.com @alvaroviebrantz

×