top of page

Final Class Project wk5 สั่งงานอุปกรณ์ผ่าน Google Assistant (Part3 Dialog flow)

  • Writer: Phurin
    Phurin
  • May 2, 2020
  • 1 min read

1.ไปที่ https://dialogflow.com/ login ให้เรียบร้อยกดไปที่ Go to console


2.สร้าง agent ขึ้นมาใหม่ขื่อ "Esp32Cap"(ตามแต่จะตั้ง) เลือก "ภาษาไทย" เวลาเป็น "Asia/Bankok" และ Google Project เลือกเป็น "captureesp32cam" ตาม firebase ที่สร้างไว้ก่อนหน้า


3.เราสร้าง keyword คำพูดกันไปที่ "Entitles" เลือก "CREATE ENTITY"


4.ตั้งชื่อว่า "capture" ให้ค่าเป็น 1 ใส่คำ keyword เป็น "ถ่ายภาพ" "ขอรูป" "ขอภาพ" ตามที่ต้องการ จากนั้นกด Save


5.ไปที่ Intent กดสร้างขึ้นมาได้ดังรูป


6.สร้าง Training pharse เป็นคำพูดที่เราจะใช่


7.กดเปิด "Action and parameters จะเห็น Entity ที่สร้างไว้ก่อนหน้า

8.ไปที่หัวข้อ "Fulfillment"ใน intent เปิด "Enable webhook call for this intent"


9.ไปที่หัวข้อ "Fulfillment" เปิด Webhook นำ URL ที่ได้จาก firebase มาใส่


10.ทดสอบการใช้งานในช่องขวามือ "Try it now" เปิด firebase ร่วมด้วย เมื่อพิมพ์คำสั่ง"ถ่ายภาพ"ใน Dialogflow จะเห็นว่าค่า capture ใน firebase เปลี่ยนเป็น 1 ตามค่าที่ตั้งไว้ (ถ้าใน firebase ไม่ขึ้นตัวแปร capture ให้สั่งใน dialogflow 1 ครั้งก่อน)


เมื่อเตรียมการ google assistant และ firebase เรียบร้อยแล้ว ไปต่อ part4

อ้างอิง https://youtu.be/LAkCc1VPXco

Comments


©2020 by Phurin'S Blog HRI. Proudly created with Wix.com

bottom of page