2019年8月5日月曜日

Voice.kitの初めの一歩

Voice.kitとVision,kitをGoogleのジョアンさんから昨年お借りしました。当時の記事ですが試したところまで公開します。Vision,kitは残念ながら動作しなかったのですが、Voice.kitを少し試してみました。この記事は、下記について書いたものです。

  • imageのダウンロード
  • imageの焼き方
  • Androidとのペアリング
  • デモの動作
  • ラズパイからのログアウト

Voice.kitとVision,kitは、どちらも同じimageを使います。

新しいキットのイメージ
https://github.com/google/aiyprojects-raspbian/releases

Flash.Flawlessをダウンロード
https://www.balena.io/etcher/

ここを参考に焼く。
https://mongonta.blog.fc2.com/blog-entry-310.html

1. 六角形のプラスのアイコンで、ダウンロードしてきたイメージをそのまま選択する。
2. MicroSDカードのを選択する。
3. 稲妻のマークのアイコンで、イメージをMicroSDカードに焼く。

4. MicroSDカードをVoice.kitに差し込む
5. 電源と繋いだMicroUSBをVoice.kitに刺す。
6. AndrodにAIYのアプリをインストールし、起動し、手順を進めて行く。
7. ペアリング後、IPアドレスを取得する。

8. PCからSSHでVision kitアクセスする。

nessie:~ ofuku$ ssh pi@192.168.XXX.XXX
The authenticity of host '192.168.XXX.XXX (192.168.XXX.XXX)' can't be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.XXX.XXX' (ECDSA) to the list of known hosts.
pi@192.168.100.144's password:

raspberry


Linux raspberrypi 4.14.71+ #1145 Fri Sep 21 15:06:38 BST 2018 armv6l
Build info: Fri Nov 16 08:31:49 UTC 2018 @ c5f367a
Last login: Fri Nov 16 08:33:56 2018

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

テストサウンドを鳴らしてみる。

pi@raspberrypi:~ $ /home/pi/AIY-projects-python/checkpoints/check_audio.py
You have Voice Bonnet (v2) installed at index 0!
Playing a test sound...
Did you hear the test sound? (y/n)
192.168.XXX.XXX

“Front! Center!”と音がなる。

Did you hear the test sound? (y/n) y
When you are ready, press Enter and say "Testing, 1 2 3"...
Recording for 3 seconds...
Playing back recorded audio...

自分の言った言葉がリピートされる。

Did you hear your own voice? (y/n) y
AIY sound card seems to be working!
Press Enter to close...

シャットダウンするときは、

sudo poweroff

pi@raspberrypi:~ $ sudo poweroff
Connection to 192.168.XXX.XXX closed by remote host.
Connection to 192.168.XXX.XXX closed.
nessie:~ ofuku$

取り敢えず、ここまでです。