You are on page 1of 47

음성 UI - 봇(Bot)과 사물인터넷의

설계 및 개발
Voice User Interface & Assistant & Bots & IoT

황주필 (jupil.hwang@oracle.com)
유원조 (wonjo.yoo@oracle.com)

Sales Consultant, Infrastructure Cloud


Aug 30, 2017

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
User Interface의 변화
CLI / GUI ??

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 3
HAL & Computer

HAL 9000 Computer

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 4
User Interface

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 5
User Interface

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 6
User Interface – CLI

CLI - Command Line Interface


Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 7
User Interface

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 8
User Interface – GUI (마우스에서 손가락으로)

GUI – Graphical User Interface


Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 9
Evolution of interaction

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 10
User Interface - Voice

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 11
Mobile Voice Interface

2011 2012 2014

Speech Recognition에서 AI로의 발전

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 12
Voice User Interface - Wars
스마트폰에서 Apple Siri와 Google Now같은 음성인식 AI비서 서비스로
경쟁을 했지만, Amazon이 2014년 인공지능 스피커 Echo를 출시,
음성인식 소프트웨어인 Alexa의 개발자 키트를 외부에 오픈  Skill이
빠르게 늘어남 (검색, 쇼핑, 뱅킹 등등..)  Echo 판매량 증가
기업명 내용
Apple - 2010년 ‘Siri’ (음성인식 소프트웨어) 인수
- 2016년 VocalIQ (음성 인터페이스) 인수
Amazon - 2011년 ‘Yap’ (STT : Speech-to-Text) 인수
- 2014년 ‘Evi’ (지식기반 Semantic Search Engine), ‘INOVA’ (TTS : Text-to-Speech) 인수
Facebook - 2013년 ‘Jibbigo’ (모바일 다국어 음성번역) 인수
- 2015년 ‘Wit.at’ (음성인식), ‘Two Big Ears’ (VR 오디오) 인수
Google - 2014년 ‘DeepMind technologies’ (AI 머신러닝) 인수
- 2016년 API.AI (음성인식, 자연어 처리) 인수, Limes Audio(음성처리) 인수

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 13
Voice User Interface - Wars
회사 이름 API / SDK

Amazon Alexa (2014) Alexa voice service sdk 제공, 한국어 지원 안함

Google Assistant (2016) Google assistant sdk 제공, 한국어 지원

Apple Siri (2011) Siri SDK for iOS, macOS 제공, 한국어 지원

SKT Nugu (2016) X

KT GigaGeenie (2017) 제휴신청 필요 (법인 심사 2주 소요)

Naver Wave (2017) 음성인식 ‘Clova’ API 공개(Android iOS SDK), 일 3600초까지 무료

Kakao Kakao mini (2017) 3분기 AI앱/스피커 출시 예정, 음성인식 “뉴톤” Android,iOS SDK

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 14
Voice User Interface - Wars
• Amazon – Alexa Voice Service (AVS)
• 2015 – Alexa Skills Kit (ASK) 공개,
2017년 1분기 이용 가능한 Skills 개수가 10,000 개 (Uber호출, Amazon
물건구입, 스타벅스 커피주문 등..)

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 15
나만의 음성인식 비서를 만들어보자

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 16
DIY Alexa !

집에 Raspberry Pi 하나쯤은 있잖아요 !

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 17
DIY Alexa !
Step 1 … 10 따라하기

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 18
DIY Alexa !

Alexa-avs-sample-app Alexa! How is the weather today??


http://github.com/alexa/alexa-avs- Alexa 개발자 – AVS 활성화 – 기기
sample-app 등록

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 19
Google Assistant 는?

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 20
DIY Google Home !
• Raspberry Pi – Audio Enable • google-oauthlib-tool –client-serect
• Audio Lib 설치 /home/pi/client_id.json –scope
https://www.googleapis.com/auth/
• Python Module 설치 with pip assistant-sdk-prototype --save --
– pip install –upgrade google-assistant- headless
sdk
• googlesampeles-assistant-hotword
– pip install –upgrade google-auth-
oauthlib
• Google APIs > credentials > client id
등록 및 client-secret json
다운로드 후 oAuth tool을 통해서
credentials.json 생성
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 21
한번 보시죠
Demo

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 22
Home Automation with Google Assistant

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 23
AI Speaker - 아키텍처

AI. Speaker Cloud

Intent 파악

기본 기능
인터넷 검색
시간,날씨,메모,음악

How’s the weather?


응답 Speech 생성

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


AI Speaker - 아키텍처

AI. Speaker Cloud

Intent 파악

“Ask my skill” “Talk to my Home”


Webhook
Other 시스템
Custom 기능
Alexa Skill, Google Action

How’s the weather?


종료

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Home Automation - 아키텍처

음성인식,출력 Case에 따른 Device 호출 Device 제어

자연어 인식 기기(TV, 에어컨, 조명) 기기 제어 API

의도(intent) 파악 명령 (On, Off) 적외선(IR) 호출

Custom 기능 Action 호출 기기 제어 API 호출

Python
Simple Http
Server
AI Speaker SDK

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Home Automation - 아키텍처

IR
(적외선)

Talk to
“My Action” Google
BroadLink TCP IR
Custom Assistant SDK
RM3 Mini
Action Python API
Google
Actions

https Python
Google
ngrok Simple Http
Api.AI Webhook Server
Home
Network
Server

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 27
ngrok 이란?

이미지 출처 https://ngrok.com/

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


TV, 에어컨 제어 - IR (적외선)

직접 만들 수 있음
Receiver, Sender, LIRC BroadLink RM3 Mini
단점: 공구 비용, 단 방향

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 29
TV, 에어컨 제어 - IR (적외선)

TV
TV ON Code : 26001399401923….
Audio ON Code : 14454512345451….
Aircon ON Code : 6234973491-384…. Audio
Send SIGNAL Code IR Signal
TCP Aircon
Learn SIGNAL
192.168.1.100
192.168.1.111

사용자 추가 기기

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 30
TV, 에어컨 제어 - Code
pi@raspberrypi:~/rm3/python-broadlink/cli $ ls
README.md aircon.turnoff broadlink_discovery tv.channel1 tv.channel5 tv.channel9 tv.turnon
aircon.downtemp aircon.turnon MyHomeServer.py tv.channel2 tv.channel6 tv.channeldown tv.volumedown
aircon.morewind aircon.uptemp device.info tv.channel3 tv.channel7 tv.channelup tv.volumeup
aircon.smallwind broadlink_cli tv.channel0 tv.channel4 tv.channel8 tv.turnoff

pi@raspberrypi:~/rm3/python-broadlink/cli $ ./broadlink_cli -h
usage: broadlink_cli [--device DEVICE] [--type TYPE] [--host HOST] [--send SEND] [--sensors] [--learn] [--learnfile
LEARNFILE]
--send SEND send command
--learnfile LEARNFILE learn command and save to specified file

pi@raspberrypi:~/rm3/python-broadlink/cli $ cat tv.turnon


2600139940192398109823874098123098120398120974812738129739128673129038012983012938216498123213
tv.turnon
Broadlink 01340891801…….
RM3 Mini broadlink_cli tv.channelup
Python API 34923043123……

https://github.com/mjg59/python-broadlink

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 31
TV, 에어컨 제어 - Code
if command == 'channel':
if level != '':
if level == '11':
exeCmd = './broadlink_cli --send @' + device + '.' + command + "1"
subprocess.call(shlex.split(exeCmd))
exeCmd = './broadlink_cli --send @' + device + '.' + command + "1"
subprocess.call(shlex.split(exeCmd))
elif command == 'volumedown' or command == 'volumeup':
for i in range(1,numlevel):
exeCmd = './broadlink_cli --send @' + device + '.' + command
subprocess.call(shlex.split(exeCmd))
...
...
def run(server_class=HTTPServer, handler_class=S, port=9876):
server_address = ('', port)
httpd = server_class(server_address, handler_class) Python BroadLink
print("Starting httpd... 9876") Simple Http RM3 Mini
httpd.serve_forever() Server Python API

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 32
Oracle Bot Integration with Alexa

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 33
Live Demo - Pizza 주문
피자주문

Oracle's Intelligent Bot 크러스트

접속 요청 사이즈

피자 종류

사이드
User
결제수단

기존 카드 정보 확인

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 34
Oracle Bot Integration with Alexa - 아키텍처

Cloud
Oracle Intelligent Bot

Alexa Voice Channel


Dialog
Service Flow
Configurator
Execution

ask
Amazon “Oracle Pizza” Channel
Custom AI
AVS SDK Alexa Skill Welcome to Components Engine
(Oracle Pizza) oracle pizza

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 35
Alexa Skill 설정
{
"intents": [
{
"slots": [
{
"name": "command",
"type": "LITERAL"
}
],
"intent": "CommandBot"
},
{
"intent": "AMAZON.StopIntent"
}
]
}
Skill invocation name Intent schema

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 36
Oracle Intelligent Bot 의 Alexa Channel 설정

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 37
Oracle Intelligent Bot 동작방식

메시지 수신 처리를 위한 특정 정보 기억

Entity

1 Utterance 3

“I want to order a pizza” “Can I order large thin cheese pizza?”


2 4 Dialog Flow

Intent

의미 파악 답변 수행

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 38
Oracle Intelligent Bot 의 Intent, Entity 설정

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 39
Web기반 음성인식 with Oracle Bot

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 40
Web기반 음성인식 with Oracle Intelligent Bot

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 41
Live Demo - 한국어 음성인식 Oracle Bot Demo

User Chrome Oracle's Intelligent Bot Backend System


브라우저

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 42


Web기반 음성인식 with Oracle Intelligent Bot - Code
if (!('webkitSpeechRecognition' in window)) {
upgrade();
} else {
start_button.style.display = 'inline-block';
recognition = new webkitSpeechRecognition(); 음성인식 객체
...

recognition.onresult = function(event) {
var interim_transcript = '';
for (var i = event.resultIndex; i < event.results.length; ++i) {
if (event.results[i].isFinal) {
var recData = event.results[i][0].transcript;
sendToBot(recData); Ajax로 Oracle
Bot 호출
...

var u = new SpeechSynthesisUtterance();


speechSynthesis.speak(u); 음성 출력

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 43
Summary

• Machine Learning 의 발달로 점점 완벽한 음성인식 가능

• AI Speaker 시장의 확대

• 다양한 음성인식 플랫폼의 전성시대

• ChatBot  음성인식 Bot으로의 전환

• 음성 인식 시스템의 SDK의 오픈  개발자들의 다양한 기회

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 44
Let’s go home to Code!!

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 45
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 46

You might also like