Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
京TECH道 第13回
Search
miiton
June 01, 2018
Technology
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
京TECH道 第13回
Raspberry PiとGoogle Homeで受付システムを作ってみよう
miiton
June 01, 2018
Transcript
72 slides
$!"!! # % 2)-6/. •
• &( – MQO! • HYKQNP]<<<Q]P<<< – ,1 ' • EMLHFJGYPUQ[ • 37+548+!2*80 # – S]]Z\D==RT]S^O<PYW=WTT]YX=FTPN • KN\ZOQ[[_9JT%HYYRVQ9IYWQ%"$<<< – ! "2)-6/.:; @>?B=>A=@C
$!"!! # %
%" #""!$ &
"-& • • • 9' • 9' /.*%- • 7DD?A>.8DB> • ,$) • !#(+ • • :<EDC<;>=@ 3125014036
%" #""!$ &
%" #""!$ &
#" $ #!""& % • 0/.21,')& ! (%3 • -,% 3 • -,% 3 • 3 • 3 • )'+* 3 % % $
%" #""!$ &
• – "! #
%" #""!$ &
1 • – = >!73+< – 6'/"5#0 – • 4 – E?@A(%/"1.0%93* – . ,-"&5#0$"(3* • ")77/"1040 :92")98 ; 73* ECDGBCFBEH
$!"!! # %
%" #""!$ &
$!"!! # %
$!"!! # %
$!"!! # %
%" #""!$ &
%" #""!$ &
%" #""!$ &
%" #""!$ &
%" #""!$ &
$!"!! # %
%" #""!$ &
$!"!! # %
$!"!! # % 0) •
)8:) – IJTRKLSSU=HN&(4,$% – (' 1.>97<3!#. +)>3 1 – 97<3!%."- – FQQMOL=GQPL32"- – 568;) $%/)&,$ %*- B@AD?@C?BE
$!"!! # % %#
• #)*,0# – ?IIFGE2@IHE# 3CB2?IIFGE32 • !666 – %"3CB2?IIFGE3&# ! #666 – A>DDD4(/-5'$.+1 666 :89<78;7:=
%" #""!$ &
& /-.1,-0,/2 ) * ) * نةٝ䬃ׅ "DUJPOTPO(PPHMF %JBMPHGMPX أؾ٦ؕ٦ؿؓٝ %" %" (!$' #+++) *
%" #""!$ &
• – &028:$.+0*2') – – (;7/32 – %*9*),504723-.16 "! #
%" #""!$ &
%" #""!$ &
% • %$# • ! "
%" #""!$ &
$!"!! # % ) %#$'"#&"%(
• ! •
%" #""!$ &
%" #""!$ &
4" • 421 – ' ( – ))) • – 421 – ,3 – 421 – $!#% & -+,/*+.*-0
%" #""!$ &
%" #""!$ &
% • – #'$& ! "
%" #""!$ &
& #! $##"% '
& #! $##"% '
# 便利なコマンド $ pinout
& #! $##"% '
$ vi l_chika.py
& #! $##"% '
import RPi.GPIO as GPIO import time GPIO_LED = 2 GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(GPIO_LED, GPIO.OUT) while True: GPIO.output(GPIO_LED, GPIO.HIGH) time.sleep(0.2) GPIO.output(GPIO_LED, GPIO.LOW) time.sleep(0.2)
%" #""!$ &
$ python l_chika.py
&#! $##"% '
%" #""!$ &
%" #""!$ &
• –
%" #""!$ &
& #! $##"% '
%" #""!$ &
& #! $##"% '
$ vi l_chika.py
& #! $##"% '
import RPi.GPIO as GPIO import time GPIO_LED = 2 GPIO_BUTTON = 26 GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(GPIO_LED, GPIO.OUT) GPIO.setup(GPIO_BUTTON, GPIO.IN, pull_up_down=GPIO.PUD_UP) while True: GPIO.wait_for_edge(GPIO_BUTTON, GPIO.FALLING) while True: sw_status = GPIO.input(GPIO_BUTTON) if sw_status == 0: GPIO.output(GPIO_LED, GPIO.HIGH) time.sleep(0.1) GPIO.output(GPIO_LED, GPIO.LOW) time.sleep(0.1) else: GPIO.output(GPIO_LED, GPIO.LOW)
& #! $##"% '
$ python l_chika.py
%" #""!$ &
&#! $##"% '
"" "!
%" #""!$ &
6FF@C>*7FD># !" • EGD)'$%@FF@C>,AFD>,EFJB?B>H # – #+6FF@C> !" +# (&<;9# – 5AHFD>*5=IJ4:8#6FF@C>*7FD> <;9#" • 6FF@C>*7FD> " 0./2-.1-03
%" #""!$ &
%" #""!$ &
# Google Homeを喋らせる環境のセットアップ $ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash – $ sudo apt-get install nodejs $ sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev $ mkdir notifier $ cd notifier $ npm init -y $ npm install google-home-notifier $ vi node_modules/mdns/lib/browser.js # google-home-notifierのREADMEにある変更を加える
& #! $##"% '
$ vi notify.js
& #! $##"% '
var googlehome = require('google-home-notifier'); var language = 'ja'; googlehome.device('Google-Home-Mini-XXXXXX', language); googlehome.notify('Hello, Google', function(res) { console.log(res); });
%" #""!$ &
$ node notify.js
& #! $##"% '
& #! $##"% '
%" #""!$ &
925+( $% A?@C>?B>AD EKTORQS<RQ<GRRNPL GRRNPL<ESSOSTJQT#!),08;( %/61 &(FOJPRNMPRU (% FOJPRNMPRU GRRNPL#3*794;-# ( )7:.08; ( "&%/61 GRRNPL<ESSOSTJQT =IH<GRRNPL= ''&%/61
&#! $##"% '
<690.+- • <690.MXXSUQ@NXVQ DA KPZTXWY@XW@MXXSUQ$:>5248. • /:="<690 EA LTOUXSRUX[" FA 7:>0 GA <690+!- /31?8% &) , '#MXXSUQ@KYYTYZOWZ/:=% '!7;!* (' ECDIBCHBEJ
%" #""!$ &
:04+) &' 27 DBCFABEADG • 41.= JTTPRO>HUUQUVNSV!*5;!/68< /9=)'()# • JTTPRO*-,=3)! " % $LK?!MI MI) @
%" #""!$ &
# Google Assistant用の環境セットアップ ※Google Assistant SDKのガイドを見ながらやり ます:ブラウザで "Google Assistant SDK"を検索
%" #""!$ &
$! • $!3>>8;7'2@@:@A5=A – 認証用credentialsファイル(予め用意) • wget http://192.168.11.X/credentials1.json • wget http://192.168.11.X/credentials2.json • &"% – !$# • 9AA?1))+0,(+./(++(4):=67B(9A<; ,*+/)*-),0
& #! $##"% '
& #! $##"% '
' )*+, 3125014036 - . - . نةٝ䬃ׅ "DUJPOTPO(PPHMF %JBMPHGMPX أؾ٦ؕ٦ؿؓٝ %" %" (!$& #///- .
& #! $##"% '
'-" 236: • 94=.*GQQLNK>FSSMSTJPT/8 < – I50%31<87.LQQLNKSJORNKS$( • .,# "+& • $<;7%GQQLNK>HQOK U*!)& – GQQLNK>HQOK.*,31<87. B@AD?@C?BE
%" #""!$ &
!% • #& (,) arecord --format=S16_LE --duration=2 -- rate=16000 --file-type=raw out.raw 「受付につないで」 <- 録音 • $'"(,) python -m googlesamples.assistant.grpc.pushtotalk -- device-model-id <DevideModelID> --device-id <DeviceID> -i out.raw --lang ja-JP --once -+,/*+.*-0
& #! $##"% '
• $ git clone https://github.com/PasonaTechLab/tech1805 $ cp tech1805/pushtotalk.py env/lib/python2.7/site- packages/googlesamples/assistant/grpc $ pip install RPi.GPIO $ vi tech1805/notify.js # Google-Home-Mini-XXXを書き換え $ cp tech1805/notify.js notifier/notify.js • python -m googlesamples.assistant.grpc.pushtotalk -- device-model-id <DevideModelID> --device-id <DeviceID> -i out.raw --lang ja-JP --once ! "
%" #""!$ &
&#! $##"% '
• – "! • $ # • – /::573%0:83 • /::573%-;;6;<19< • -2<6:9;%:9%/::573 • .617:547:= )'(+&'*&),
%" #""!$ &
– ( $7D; – 5DD@B>*6DC>%) – 3A=BD@?BDE!'"#&"# • 8794*2:; • <42# !'"#&"# .,-0+,/+.1
%" #""!$ &
Other Decks in Technology
See All in Technology
cdkdがどんだけ早いか、実際に動かして見てみよう
smt7174
1
130
AIで実装が加速したのに、 なぜ私は仕事の大半で人と話し続けていたのか?
say_no_w
0
190
Datadog の権限統制 〜Org 統合に向けて調べた注意点 / JDDUG-Meetup_24
visional_engineering_and_design
1
180
AIネイティブ組織の作り方。1人のPOとAIから始める、自社での実験
ama_ch
2
1.2k
SORACOM × AWS IoT Core でSREする
butadora
0
110
自動計装なしでECSサービスをApplication Signalsに載せるまで
ota1022
2
340
MCPでネットワーク障害調査を自動化する前に直すべき3つのこと
yama3133
1
590
共通基盤の実装に Kotlin - Quarkus を選定した理由と採用したアーキテクチャ
nealle
1
110
DevOps Agentにあらゆるセキュリティインシデントのトリアージを任せた件
jirtosterone
1
180
Kansai WordPress Meetup@大阪『ブロックテーマを作る上で知っておくべきこと
torounit
0
230
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
360
Shared Signals Framework 仕様解説
oidfj
0
480
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
25k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
540
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
Six Lessons from altMBA
skipperchong
29
4.6k
Amusing Abliteration
ianozsvald
1
390
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
570
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
530
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
3.9k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
560