*몇몇 깨진 부분은 (말풍선등) PDF를 다운로드 받으시면 정상적으로 표시됩니다*
DevFest 2017 서울 행사에서 'Google Assistant를 위한 앱 만들기'라는 제목으로 진행된 세션 발표 자료입니다. Google Assistant의 개념과 주요 용어를 정리해 보았습니다. Actions on Google 플랫폼의 주요 기능 및 한계를 설명하고 및 이를 통해 간단한 챗봇 앱을 만들 수 있는 방법을 소개합니다. Google Assistant에서 동작하는 앱을 개발자가 활용할 수 있는 방법을 제안합니다.
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Google Assistant를 위한 앱 만들기
1.
2.
3.
4. “So we made Google Search for everyone, and Google Assistant - just for you.”
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15. 최고의 아재 개그는 사용자가 부르면 아재
개그를 날리는 Welcome 액션을 갖고 있
습니다.
16.
17.
18.
19. {
"actions": [
{
"name": "MAIN",
"intent": {
"name": "actions.intent.MAIN"
},
"fulfillment": {
"conversationName": "sekaiApp"
}
}
],
"conversations": {
"sekaiApp": {
"name": "sekaiApp",
"url": "https://sekai.example.com/sekaiApp"
}
}
}
Action Package 정의
function responseHandler (app) {
// intent contains the name of the intent you defined in `initialTriggers`
let intent = app.getIntent();
switch (intent) {
case app.StandardIntents.MAIN:
app.ask('Welcome! Say a number.');
break;
case app.StandardIntents.TEXT:
let number = app.getArgument(NUMBER_ARGUMENT);
app.tell('You said ' + number);
break;
}
}
// you can add the function name instead of an action map
app.handleRequest(responseHandler);
ActionSdk 라이브러리를 이용
비지니스 로직 작성
20.
21. <speak>안녕하세요.
<say-as interpret-as="characters">SSML</say-as> 샘플입니다.
잠시 멈출 수 있습니다.<break time=“3s"/>
<audio src=“https://actions.google.com/sounds/v1/weapons/50_cal_shells_drop.ogg”>오디오
파일을 재생할 수 있습니다.</audio>.
<prosody pitch="low">낮은 목소리로 읽을 수도 있습니다.</prosody>
<prosody pitch="high">높은 목소리로 읽을 수도 있습니다.</prosody>
<prosody rate="slow">천천히 읽을 수 있습니다.</prosody>
<prosody rate="fast">빠르게 읽을 수도 있습니다.</prosody>
<emphasis level="strong">문장을 강조해서 읽을 수도 있습니다.</emphasis>
</speak>