SlideShare a Scribd company logo
1 of 95
Clovaスキルストアに
「駅すぱあとの山手線ゲーム」
スキルをリリースするまで
竹田龍介
<株式会社ヴァル研究所>
『はじめての駅すぱあとWebサービス』書籍出版記念イベント
自己紹介
名前
竹田 龍介 (@t_ryusuke)
勤務先
株式会社ヴァル研究所
仕事内容
現在、駅すぱあとWebサービスを使った自社サー
ビスや受託案件のほか、Alexaの駅しりとりや
Ekisbeeeat(エキスビート)なども開発しています。
エキスビート?
はい、ヴァル研究所の受付にあるゲームです!
エキスビートを開発するきっかけ
❏ 2016年、ヴァル研究所が40周年となったきっかけ
に開発合宿でなにか新しいものを作りたかった
❏ ダイヤを使ったリズムゲームがヴァルっぽい
❏ せっかくなので、ゲーセンに置けるくらいのゲー
ムにする
❏ Unityだったらできると思った
そう、Unityならね
そして、Unite 2016 Tokyoにも出展しました
そして、今・・・
iOSとAndroid向共にリリース中です。
(120円です)
買ってね!
というわけで
当社と
ユニティ・テクノロジーズ・ジャパン
について
それについては、まず、
ここから話さなくてはなりません
RODEM(ロデム)ってなに?
GoogleカレンダーやOffice365の
予定表にスケジュールを
入れるだけでカレンダーに
経路が登録されるサービスです。
カレンダーにスケジュールを入れる
移動予定が自動で入る
予定を入れるだけの簡単操作でスケジュール管理
経費精算もそのまま出来てチョー便利!
そのRODEMですが・・・
ユニティさんの導入事例がここにあります
こういうことです
ゲームエンジン使う
RODEM使う
詳しくはこちらにアクセス!
https://rodem.valwebservices.com/
(無料トライアルもこちらからできます)
って、Clova関係ないじゃん・・・
コラー! ( `Д´)ノ
すみません・・・
本日、お話する内容
Clovaに駅すぱあとの山手線ゲームをリリースする際
に苦労したこと、工夫したこと、Alexaと比較した際
にどこが違うのかを中心に、駅すぱあとのAPI「駅す
ぱあとWebサービス」の紹介をしていきます。
アジェンダ
❏ 山手線ゲームをClovaのスキルとしてリリースす
るきっかけ
❏ 駅すぱあとの山手線ゲームって何?
❏ 駅すぱあとWebサービスで何やってるの?
❏ LINE Clova スキルの概要
❏ スキル開発で困ったこと(Alexaとの違いなど)
❏ まとめ
駅すぱあとの山手線ゲームをClovaの
スキルとしてリリースするきっかけ
駅すぱあとの山手線ゲーム
Alexa向けのスキル駅しりとりが好評で「駅しりとり
を作った開発者がLINE Clovaのスキルも開発させよ
う」と社内調整があったため、釣られました。
実績って大切だね
たぶん、駅しりとりをリリース
してなかったら声がかかることは
なかったと思う・・・
駅すぱあとの山手線ゲームって何?
駅すぱあとの山手線ゲームとは
山手線ゲームが手軽に遊べるゲームです
東京
山手線にある駅名を言ってね
正解
秋葉原
ゲーム内容
1. Clovaがお題となる路線を言う
2. ユーザーが駅名を言う
3. Clovaが判定を行う
a. 正解 or 間違い or 既出の駅 など
4. ユーザーがClovaからヒントをもらう
a. かから始まる3文字の駅→「かんだ」
駅すぱあとWebサービスで何やってるの?
駅すぱあとWebサービスとは
❏ 乗り換え案内サービス「駅すぱあと」のAPI
❏ 経路検索エンジンだけでなく、「駅情報」「路線
情報」など、各種データ取得にも使える
❏ REST APIなので、簡単に使える
駅すぱあとWebサービスの活用
❏ 交通機関情報を活用したアプリケーションやゲームが誰
でも簡単に作ることが出来るを目指しています
❏ 駅すぱあとWebサービスを利用することでサーバーを用
意せずに開発が出来ます
❏ 常に最新情報を提供しているため、メンテナンス不要
❏ 本日はそういった駅すぱあとWebサービスを利用した山
手線ゲームスキルの開発を紹介します
駅すぱあとWebサービスできることの一例
山手線の駅ってなに?
東京のほか、渋谷や秋葉原
なんかがありますよ
実際のイメージ
GETパラメータ
JSON/XML
スキルでは、この路線名から対象となる駅の
一覧を取得する機能を利用してます
ちなみに・・・
駅すぱあとWebサービスはスタンダー
ドプラン(有償)とフリープラン(無償)が
あります。
駅すぱあとの山手線ゲームは、フリー
プランで提供中の機能だけで実装して
います。
ぜひぜひ、
使ってみて
フリー版 あります
LINE Clova スキルの概要
LINE Clovaでやっていること#1
音声データ Clova Extensions Kit
♪トウキョウ
LINE Clovaでやっていること#2
音声データ
テキスト
Clova Extensions Kit
東京
LINE Clovaでやっていること#3
音声データ
テキスト
テキスト
Clova Extensions Kit
正解
LINE Clovaでやっていること#4
音声データ
合成音
テキスト
テキスト
Clova Extensions Kit
♪セイカイ
こういった音声⇔テキスト変換が行われます
※ただ、ここには罠があります・・・(後ほど紹介)
スキル開発で困ったこと
(Alexaとの違いもあるよ)
1.ゲーム内容を考えるだけで一苦労
Alexaで駅しりとりをリリースしていたのですが、
「そのままベタ移植して大丈夫なのか?」と思い、
駅しりとりとは違うゲームを考えました。
理由はズバリ、AlexaとClovaの
メインターゲットが違うからです
(個人的な見解)
想定されるターゲット(個人的な見解)
● Alexa
ガジェットオタク、アマゾン(ECサイト)を使う人
VUIを積極的に使ってみたい人
● Clova
女性(特に主婦)、LINEを日頃利用している人
LINEのキャラクターがかわいいと思う人
なんか、最初はすげー難しいゲームだった
まず、Clovaがお題を出して
対戦するゲームにしました。
しかし、相手がプログラムです。
Clovaが100%正解してユーザーが
勝つことはまずありません。
しかも、鬼畜ゲーでした・・・
山手線内回りの
駅を順番に
言ってください
一部の方には好評だったらしのですが・・・
かと言って、ランダムで負けるゲームの
どこが面白んだか・・・
そもそも、山手線ゲームってゆるいゲームなんじゃ
とりあえず、繋げなくてもいいから
Clovaが優しくヒントなども出しつつ、
一人でやるゲームでも良いかなと
思い始めた・・・
もちろん、みんなでワイワイ楽しんでも良し
というわけで、リリース直前、
大幅に作り直すことが決定しました・・・
2.処理するサーバーが用意されていない
● Alexa
Alexa Skills Kit上でLambdaを設定するだけでOK
● Clova
Clova Extensions Kitではインテントやスロットの設
定をするだけで、処理するサーバーが用意されて
いない
そう、別途、処理するサーバーが必要になります
サーバーのイメージ
Alexa Skills Kit
JSON
JSON
話しかける
応答
話しかける
応答
POST
レスポンス
Clova Extensions Kit
自前
その他の成約
● HTTPSである必要がある
必ず暗号化しなければならない。HTTP不可
● インテントやスロットなどはPOSTで送られる
BODYにJSONが入っているので、解析が必要
● 送信元の検証が必要
外部公開になるので、送信元をチェックする
まあ、LambdaをAPI Gatewayで公開する
イメージなので、Alexa開発者なら
わかりやすいと思う
3.開発用の端末というものがない
これは、Clova使っている人だったらすぐわかると思
いますが、スマホアプリのClovaで市販されているス
ピーカーを登録する必要があります。
使うかどうかわからないけど、半額だからという理
由だけで購入したClova Firendsが役に立った
ただ、そのClovaと開発者のアカウントを連携させて
動かす必要があるため、いつも使っているLINEアカ
ウントから切り離す必要があります。
さよなら、Clova Friends・・・
===
==
=
友達がいない山手線ゲームちゃんに贈呈
なんて言いましたが、これは
(つい最近?)改善されてた・・・
開発アカウントじゃなくてもOK
いろいろ仕様が変わるので、
開発者は要注意ですね
おかえり、Clova Friends・・・
===
==
=
というわけで、Clova持っている人は
すぐ開発を始められますよ
4.レスポンスはどうなってるの?
● インテント
基本的に同じです
● スロット
これもずらずらっと並べます
● レスポンス
outputSpeech や sessionAttributes などはあります
shouldEndSession の使い方も同じです
ただ、これだけは注意が必要
● outputSpeech
○ Alexa
SSMLで書きます
“<speak>こんにちは</speak>”とかね
○ Clova
SimpleSpeech or SpeechList で書きます
outputSpeechの例
● SimpleSpeech
“こんにちは”だけです
タグは使えません
● SpeechList
SimpleSpeechを配列にします
この場合音声も渡せますが、“type=URL”でURLを
一つだけ渡します
Alexaのベタ移植は出来ないので、変換は必要です
5.Clovaがちゃんと変換してくれない
まず、てんまはどういう漢字を書くと思いますか?
ほとんどの人は天馬だと思います。
※天魔って思っちゃった方、おそらく
東方が好きなんだな・・・
なので、割り切りが大切
本当は天満と認識してほしいの
ですが、そういうレアなケースは
少ないので、天馬もOKと
登録しています。
ところが、実装コストが・・・
対応している路線すべての
認識の差を実機で確認し、
誤認している駅を追加で
登録しました。
うまくいかない変換の例
天満(てんま)→天馬
東京(とうきょう)→tokyo
大正(たいしょう)→対象
市場前(しじょうまえ)→試乗前
ニホンゴムズカシイ
5路線しか無い理由はこれだったんです・・・
6.Clovaが変換した駅名と駅すぱあとの駅名が違う
おおくぼ
大久保 大久保(東京都)
駅名が違う理由
● 駅すぱあとWebサービス
全国で同一の駅名が合った場合、その中から1つ
の駅を特定する必要がある
大久保の場合は京都、兵庫、秋田にもある
● Clova
同じ駅名でも地域を特定する必要がない
その他の理由
● 同音異義語
たばた→(田端/田畑)
● 連体助詞
霞ケ関と霞が関(両方共「かすみがせき」)
● 表記ゆれ
Osaka Metro/大阪メトロ
どのように処理するかはプログラマーの腕の見せ所
結局、同名駅除去プログラムとか作った
getResponse(url).then(function (resultSet) {
let max = parseInt(resultSet.ResultSet.max, 10);
for (var i = 0; i < resultSet.ResultSet.Point.length; i++) {
let shortName = getShotName(resultSet.ResultSet.Point[i].Station.Name);
if (stationIndexOf(shortName, resultSet.ResultSet.Point[i].Station.Yomi, result) == -1) {
result.stations.push(resultSet.ResultSet.Point[i].Station.Name);
}
}
if (offset + 100 > max) {
console.log(result);
} else {
getStationList(offset + 100);
}
});
まとめ
スマートスピーカーで大切なこと
❏ やはり、開発実績は大切
❏ 未知の領域に踏み入れるのは苦労する
(ドキュメントはしっかり読もう)
❏ Alexaで開発の経験があれば、比較的簡単かも
❏ 実機での確認ちゃんと行う
❏ 駅すぱあとWebサービスの特性を知ろう
LINE BOOT AWARDS 2018の
協賛パートナーにもなっていますので、
これから共に盛り上げていきましょう
ご清聴ありがとうございました

More Related Content

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

駅すぱあとの山手線ゲーム