簡易檢索 / 詳目顯示

研究生: 林育暐
Yu-Wei Lin
論文名稱: 應用於智慧家庭之聲控系統
A Voice Control System for Smart Home Applications
指導教授: 吳傳嘉
Chwan-Chia Wu
口試委員: 黎碧煌
Bih-Hwang Lee
張俊明
Chun-Ming Chang
學位類別: 碩士
Master
系所名稱: 電資學院 - 電機工程系
Department of Electrical Engineering
論文出版年: 2017
畢業學年度: 105
語文別: 中文
論文頁數: 168
中文關鍵詞: 智慧家庭聲控Amazon AlexaGoogle AssistantActions on Google
外文關鍵詞: Smart Home, Voice control, Amazon Alexa, Google Assistant, Actions on Google
相關次數: 點閱:393下載:2
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 隨著科技的進步,具有連網功能的裝置數量不斷上升,至今已逐漸邁向物聯網時代。物聯網在人類生活上的應用,最具代表的應用就是智慧家庭系統。現今的智慧家庭系統(如Nest、Samsung SmartThings)均提供可控制智慧家庭的手機應用程式,使用此手機應用程式可隨時讀取家中智慧家庭裝置的狀態;也可透過此手機應用程式控制智慧家庭裝置。然而在科技的進步下,人機互動的方式已從過去常用的觸控發展出新的互動方式─聲控。
    本論文為分別研究兩種語音助理:Amazon Alexa與Google Assistant,並分別實作其開放的開發技術,在Alexa部分,實作其開發技術套件,自行實作語音功能與開發語音服務;Google Assistant部分,實作其開放的開發技術平台Actions on Google,自行開發語音服務。最後,對於兩系統的實作成果做出比較與分析,提供開發者更剖析的了解。
    本論文在實作上分為兩部分,第一部分為實作出兩系統(Amazon Alexa與Actions on Google)完整的系統架構,其中包含了裝置、終端與外部web service;第二部分則將實作出的完整系統與IP Camera做整合,達到能夠使用聲控控制多台IP Camera的功能。本論文實作兩種智慧家庭聲控系統,並延伸控制多個IP Camera,為開發人員完整解析兩種聲控系統。


    As technology advances, the number of devices with networking capabilities increased in a very fast speed, and it has been gradually moving towards the age of Internet of things. As of Internet of things’ applications in human life, Smart Home system is the most distinctive representative. Companies such as Nest, Samsung develope smart home systems and smart home apps. Users can use these apps to read smart home devices’ status at any time; also user can set the status of Smart Home device through this app. However, in the progress of science and technology, human-machine interface control is no longer confined to touch control, but evolves to a new human-machine interface control ─ Voice Control.

    This study gives more information about how to build a voice control system with Amazon Alexa voice development technology. Besides, Google Home smart home assistant, recently released and implemented by its open development technology platform, enables developers to develop their own voice services. Finally, the research gives some analysis and result from the implementation of the two systems, and provides developers more in-depth understanding.

    This study is divided into two parts. The first part is the entire architecture of the systems (Amazon Alexa and Actions on Google) which contain devices, endpoints and web services. The second part is that the system mentioned above combined with IP cameras, and it can achieve a function that controls multiple cameras with voice control. In conclusion, this research implements two kinds of voice control systems of smart home, and controls multiples IP cameras. Furthermore, this paper provides the analysis between Amazon Alexa and Action on Google completely.

    摘要 I ABSTRACT II 誌謝 III 目錄 IV 圖目錄 VII 表目錄 X 第一章 緒論 1 1.1 研究背景 1 1.2 研究動機與目的 3 1.3 研究內容 6 1.4 章節架構 6 第二章 系統軟體架構介紹 7 2.1 Android簡介 7 2.2 開發環境 7 2.2.1 Java 7 2.2.2 Android Studio 8 2.2.3 Node.js 9 2.2.4 PHP 10 2.2.5 Apache HTTP Server 11 2.3 Alexa語音助理 12 2.3.1 Alexa服務系統架構 12 2.3.2 Alexa安全認證 13 2.3.3 Skill 17 2.3.4 Amazon Alexa App 18 2.3.5 AWS Lambda 18 2.3.6 Alexa技術套件─Alexa Voice Service 19 2.3.7 Alexa技術套件─Alexa Skill Kit 19 2.4 Google Assistant語音助理 22 2.4.1 Google Assistant 23 2.4.2 Conversation Actions 24 2.4.3 Assistant目錄 25 2.4.4 Conversation API 27 2.4.5 Actions on Google開發平台 28 2.4.6 Actions SDK 29 2.4.7 API.AI 30 2.4.8 Fulfillment配置平台 31 2.5 Onvif監控規範標準簡介 32 第三章 系統設計 34 3.1 使用Alexa語音助理設計的系統架構 34 3.2 Alexa Voice Service應用程式系統設計 35 3.2.1 Alexa Voice Service應用程式規範 36 3.2.2 Alexa Voice Service應用程式流程圖 38 3.3 Alexa Skill Kit語音服務系統設計 39 3.3.1 Alexa Skill Kit語音服務設計規範 39 3.3.2 Alexa Skill Kit語音服務運作流程 47 3.4 使用Google Assistant語音助理設計的系統架構 54 3.5 建立Actions on Google開發者專案與API.AI Agent 56 3.6 使用API.AI開發工具建立語音服務 58 3.6.1 Intent的主要組成元件 58 3.6.2 定義Actions 63 3.6.3 Fallback回應 67 3.6.4 建立與配置fulfillment 68 3.7 設定開發者的Assistant應用程式 72 3.7.1 應用程式資訊設定 73 3.7.2 Actions on Google實作Account Linking功能 77 第四章 Alexa語音助理與Onvif裝置整合實作 83 4.1 註冊Alexa Voice Service產品 83 4.1.1 應用程式類型資訊 84 4.1.2 安全用戶資料 84 4.2 安裝AlexaAndroid Library 84 4.2.1 建立專案、安裝AlexaAndroid Library 85 4.2.2 參數設定 87 4.2.3 測試Login with Amazon認證服務 88 4.3 Alexa Voice Service手機應用程式實作流程與設計 90 4.3.1 Alexa Voice Service手機應用程式實作流程 91 4.3.2 Alexa Voice Service手機應用程式設計 93 4.4 實作控制Onvif IP Camera的語音服務(Skill) 95 4.4.1 Alexa Skill Kit語音服務規範設計 96 4.4.2 Skill adapter設計 99 4.5 外部web service實作Account Linking功能 100 4.5.1 HTTPS實作 100 4.5.2 外部web service實作Account Linking功能 100 4.5.3 實作ONVIF PHP implementation專案 102 4.6 系統運作流程 104 4.6.1 開啟控制IP Camera的Skill 104 4.6.2 系統運作流程 106 4.7 實作成果 107 4.7.1 開啟控制IP Camera的Skill 107 4.7.2 手機應用程式控制IP Camera 109 第五章 Google Assistant語音助理與Onvif裝置整合實作 111 5.1 實作控制Onvif IP Camera的語音服務(Action) 111 5.1.1 API.AI設定項目 111 5.1.2 Actions on Google開發者專案設定項目 115 5.1.3 Fulfillment設計 117 5.2 系統運作流程 118 5.2.1 啟用控制IP Camera的Assistant應用程式 118 5.2.2 系統運作流程 119 5.3 實作成果 120 第六章 系統比較 125 6.1 系統比較對照表 126 6.2 系統運作流程比較 128 6.3 系統裝置 130 6.4 語音助理 130 6.5 終端系統 131 6.6 辨識度 131 第七章 結論與未來展望 133 參考文獻 135 附錄A 官方Amazon Alexa JavaScript SDK解說 140 附錄B connectiontoserver-test的Skill adapter 144 附錄C Smart-Home的Fulfillment 150 附錄D URL、URI和URN的區別 154

    [1] Internet of Things –From Research and Innovation to Market Deployment, in Communications, O. Vermesan and P. Friess, Editors. 2014. p. 9.
    [2] 蘇宇庭. Amazon Echo憑什麼成為最火紅的IoT裝置?. Available:https://www.bnext.com.tw/article/40024/bn-2016-06-24-180752-178
    [3] 2016 Internet Trends, 2016: Kleiner Perkins Caufield Byers(KPCB). pp. 111-131.
    [4] Intelligent Voice Assistants – Q1 2016 User Adoption Survey Results, 2016: MindMeld. pp. 14-15.
    [5] 吳金榮. 亞馬遜Alexa智慧語音助理與谷歌Google Assistant的戰爭. Available:http://www.appledaily.com.tw/realtimenews/article/new/20170118/1035851/
    [6] 楊智家. 智慧語音助理大舉滲透智慧家庭領域 聲控家庭時代即將來臨. Available:http://www.digitimes.com.tw/iot/article.asp?cat=158&id=492208
    [7] 吳雲漢, “Design of a Voice Controlled Smart Home System”, 國立台灣科技大學電機工程學系碩士論文, 2016.
    [8] 黃彬華, “Android 6~5.x App開發教戰手冊”, 第一版, 台北市, 碁峰資訊, 2015, pp. 1-2–1-7
    [9] Wiki. Java. Available:https://zh.wikipedia.org/wiki/Java
    [10] Wiki. Android Studio. Available:https://zh.wikipedia.org/wiki/Android_Studio
    [11] Wiki. Node.js. Available:https://zh.wikipedia.org/wiki/Node.js
    [12] Simen. 非同步程式碼之霧:Node.js 的事件迴圈與 EventEmitter. Available:https://simeneer.blogspot.tw/2016/09/nodejs-eventemitter.html
    [13] Wiki. PHP. Available:https://zh.wikipedia.org/wiki/PHP
    [14] Wiki. Apache HTTP Server. Available:https://zh.wikipedia.org/wiki/Apache_HTTP_Server
    [15] Amazon.com. Amazon Echo. Available:https://www.amazon.com/Amazon-Echo-Bluetooth-Speaker-with-WiFi-Alexa/dp/B00X4WHP5E
    [16] Amazon.com. Login with Amazon. Available:http://login.amazon.com/
    [17] Amazon.com. OAuth 2.0. Available:http://oauth.net/2/
    [18] Amazon.com. Alexa Skills Kit Glossary. Available:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-glossary
    [19] Amazon.com. AWS Lambda Documentation. Available:https://aws.amazon.com/tw/documentation/lambda/
    [20] Amazon.com. Alexa Voice Service. Available:https://developer.amazon.com/AVS
    [21] Amazon.com. Alexa Skill Kit. Available:https://developer.amazon.com/ask
    [22] Amazon.com. Alexa Skills Kit Custom Interaction Model Reference. Available:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interaction-model-reference.
    [23] Amazon.com. Linking an Alexa User with a User in Your System. Available:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/linking-an-alexa-user-with-a-user-in-your-system.
    [24] 張庭瑜. 智慧管家比一比!Google Home 和 Amazon Echo 誰厲害?. Available:https://www.bnext.com.tw/article/41248/google-home-vs-amazon-echo
    [25] ifanr. 開售一個月後,Google Home 終於向第三方開發者開放了. Available:http://www.ifanr.com/759650
    [26] Brian Chen. Google I/O 2016:Google Assistant 與衍生的 Google Home、Allo、Duo 產品正式亮相,發表 DayDream 行動 VR 平台. Available:https://technews.tw/2016/05/19/google-io-2016-summary/
    [27] 林妍溱. 語音助理戰火升溫,Google釋出Google Assistant SDK. Available:http://www.ithome.com.tw/news/113740
    [28] Google. Assistant conversations. Available:https://developers.google.com/actions/assistant/basics
    [29] Google. Assistant directory. Available:https://developers.google.com/actions/discovery/directory
    [30] Google. Conversation API. Available:https://developers.google.com/actions/reference/v1/conversation
    [31] Google. App Components. Available:https://developers.google.com/actions/components/
    [32] Google. Actions SDK-Build an App. Available:https://developers.google.com/actions/sdk/
    [33] Google. API.AI-Build an App. Available:https://developers.google.com/actions/apiai/
    [34] Google. Fulfillment Hosting. Available:https://developers.google.com/actions/tools/fulfillment-hosting
    [35] Wiki. ONVIF. Available:https://en.wikipedia.org/wiki/ONVIF
    [36] Amazon.com. Getting Started with the Alexa Voice Service. Available:https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/getting-started-with-the-alexa-voice-service.
    [37] Amazon.com. Android App Signatures and API Keys. Available:https://developer.amazon.com/appsandservices/apis/engage/login-with-amazon/docs/android_app_signatures.html.
    [38] Amazon.com. Getting Started with the Alexa Skills Kit. Available:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/getting-started-guide.
    [39] Amazon.com. Choosing the Invocation Name for a Custom Skill. Available:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/choosing-the-invocation-name-for-an-alexa-skill.
    [40] Amazon.com. Defining the Voice Interface. Available:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/defining-the-voice-interface.
    [41] Amazon.com. Creating an AWS Lambda Function for a Custom Skill. Available:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/developing-an-alexa-skill-as-a-lambda-function.
    [42] Amazon.com. Authorization Code Grant. Available:https://developer.amazon.com/appsandservices/apis/engage/login-with-amazon/docs/authorization_code_grant.html.
    [43] Google. Create a Project and API.AI Agent. Available:https://developers.google.com/actions/apiai/project-agent
    [44] Google. API.AI-Build Fulfillment. Available:https://developers.google.com/actions/apiai/fulfillment
    [45] Google. API.AI-Define Actions. Available:https://developers.google.com/actions/apiai/define-actions
    [46] Google. API.AI-Deploy Fulfillment. Available:https://developers.google.com/actions/apiai/deploy-fulfillment
    [47] Google. Actions on Google Developer Console-Registering and Publishing Your App. Available:https://developers.google.com/actions/console/publishing
    [48] Google. Account Linking-Implementing Account Linking. Available:https://developers.google.com/actions/identity/account-linking
    [49] Blaschko, W. AlexaAndroid Library. Available:https://github.com/willblaschko/AlexaAndroid.
    [50] 陳韋勳, On the Improvement of Controlling Onvif Compatible IP Camera via Android App, 國立台灣科技大學電機工程學系碩士論文, 2016.
    [51] Android. AudioRecord. Available:https://developer.android.com/reference/android/media/AudioRecord.html.
    [52] Amazon.com. SpeechRecognizer Interface. Available:https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/reference/speechrecognizer.
    [53] Lorenzo. ponvif. Available:https://github.com/ltoscano/ponvif.
    [54] 利用Openssl實作ssl網頁加密. Available:http://joe01032002.pixnet.net/blog/post/92665237-%E3%80%90php%E3%80%91%E5%88%A9%E7%94%A8openssl%E5%AF%A6%E4%BD%9Cssl%E7%B6%B2%E9%A0%81%E5%8A%A0%E5%AF%86
    [55] 唐美鳳. Google Assistant 正式開放 所有 Android 6.0 以上手機均可使用. Available:https://unwire.hk/2017/02/28/google-assistant-open-to-all-android-6-phone/software/android-app/
    [56] Amazon Alexa JavaScript SDK: The Ultimate Guide. Available:http://tobuildsomething.com/2015/08/14/Amazon-Alexa-JavaScript-SDK-The-Ultimate-Guide/
    [57] April. 你知道URL、URI和URN三者之間的區別嗎?. Available:http://iguang.tw/u/4219580/article/479709.html

    QR CODE