Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
2018年12月15日 AITCシニア成果発表会 想い楽器(おもいがき) | PDF
[go: Go Back, main page]

想い楽器(おもいがき)
~いつでも、どこでも、想いを残す~
冷静になって 熟考!
2018年12月15日
Ofuroチーム 岡村 和典 :ウルシステムズ
蒔田 守 :富士通
アジェンダ
1. 背景
2. 作成品
3. デモ
4. 設計
5. 苦労したこと
6. 今後の展望
7. 個人の感想
8. appendix
1. 背景
楽 想い
器
こんなことありませんか?
・いいアイデアひらめいた!
・これからやるタスク思い出した!
忘れないように、
覚えておかないと!!
問題点
• 頭で覚えようとしても忘れてしまうことも
• リラックスできない!!!!
・ハンズフリーでアイデアを記録可能なデバイスを作ろう!
・髪を洗っている時や、体を洗っている時でも即入力可能!
頭の中をすぐに吐き出せるので、脳内衛生も快適に
両手がふさがっているなど、すばやく携帯でメモを取れない
時にも利用可能に
2. 作成品
お風呂で使うぞ!
防水、電源、無線
全体図
【PC側】
④tera term
⑤スプレッドシート
⑥ルーター
【お風呂側】
①防水スピーカー
②USBマイク
③モバイル 防水ラズパイ
1
2
3
4
5
6
利用方法:発想
ほげほげ
2.音声を入力
4.音声をテキス
トとして
スプレッド
シートに保存
1.入力待ち合図
3.音声を出力
利用方法:熟考
Google スプレッドシート
ほげほげ |
ーーーーーーーーーー
ほがほが | 5.テキストか
ら再思考
3. デモ
・実機のデモ
・お風呂での風景
• 応答(例) • 音楽演奏(例)
4. 設計
お手軽に、
防水でモバイル
Google Speech API
Google Apps Script
防水スピーカー
¥1,050
バッテリー
¥1,364
ケーブル
¥390
アルミケース
¥1,985
USBマイク
流用
ラズパイ
流用
タッパ
¥100
ルーター
流用
ドングル
流用
用意するもの
PC
流用
Raspberry Pi
Rasbian
blueman
pavucontrol
HFPA2DP/
HSP
Google Apps
Script
open-jtalk
防水
スピーカー
USBマイク
python
ソフトウェア構成
pulseaudio
pi-bluetooth
pulseaudio-
module-bluetooth
bluez
bluetooth
ofno
音
声
出
力
音
声
入
力
PC
Tera
term
Google
Speech API
テ
キ
ス
ト
変
換
テ
キ
ス
ト
保
存
flac
alsa-utils
sox
libsox-fmt-all
【Bluetooth、サウンドサーバのサービス化】
sudo systemctl enable hciuart.service
sudo systemctl enable pulseaudio.service
sudo systemctl enable ofono
【防水スピーカーとBluetooth接続】
sudo su -s /bin/bash pulse
bluetoothctl
pair 00:58:56:09:9C:15
connect 00:58:56:09:9C:15
【アプリケーション起動】
python ai-dialog.py
準備と起動
【ai-dialog.py】
GOOGLE_APIKEY = ‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx‘
LISTEN_SECONDS = 5
VOICE_IN_PATH = '/home/pi/ai-samples/tmp.flac‘
VOICE_OUT_PATH = '/home/pi/ai-samples/tmp.wav‘
BLUETOOTH_BTS = 'bluez_sink.00_58_56_09_9C_15.a2dp_sink‘
# 録音
def listen(seconds):
cmdline = 'AUDIODEV=hw:0,0 rec -c 1 -r 16000 ' + VOICE_IN_PATH + ' trim 0 ' + str(seconds)
os.system(cmdline)
cmdline = 'paplay -d ' + BLUETOOTH_BTS + ' ' + VOICE_IN_PATH
os.system(cmdline)
# 音声認識
def recognize():
f = open(VOICE_IN_PATH, 'rb')
voice = f.read()
f.close()
url = 'https://www.google.com/speech-api/v2/recognize?xjerr=1&client=chromium&'¥
'lang=ja-JP&maxresults=1&pfilter=0&xjerr=1&key=' + GOOGLE_APIKEY
hds = {'Content-type': 'audio/x-flac; rate=17000'}
# スプレッドシートへ記録
def setSpreadsheet(text):
url = "https://script.google.com/macros/s/yyyyyyyyyyyyyyyyyyyyy/exec"
s = requests.session()
params = {"value": text}
response = requests.post(url, data=json.dumps(params))
# 読み上げ
def speak(message):
JDIC_DIR='/var/lib/mecab/dic/open-jtalk/naist-jdic/‘
VOICE_DATA='/home/pi/ai-samples/ai/mei/mei_happy.htsvoice‘
cmdline = 'echo ' + message + ' | open_jtalk -x ' + JDIC_DIR + ¥
' -m ' + VOICE_DATA + ' -ow ' + VOICE_OUT_PATH + ' -s 17000 -p 100 -a 0.03‘
os.system('paplay -d ' + BLUETOOTH_BTS + ' ' + VOICE_OUT_PATH)
プログラムソース(抜粋)
5. 苦労したこと
思うようにいかないぞ!
Bluetooth機器
【Bluetooth機器(BTS-06)のプロフィール】
pactl list
カード #1
名前: bluez_card.00_58_56_09_9C_15
ドライバー: module-bluez5-device.c
モジュール: 13
プロパティ:
device.description = "BTS-06"
device.string = "00:58:56:09:9C:15"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_00_58_56_09_9C_15"
bluez.class = "0x240404"
bluez.alias = "BTS-06"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
プロフィール:
a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 10, available: yes)
headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 20, available: no)
off: オフ (sinks: 0, sources: 0, priority: 0, available: yes)
有効なプロフィール: a2dp_sink
ポート:
headset-output: Headset (priority: 0, latency offset: 0 usec)
Part of profile(s): a2dp_sink, headset_head_unit
headset-input: Headset (priority: 0, latency offset: 0 usec, not available)
Part of profile(s): headset_head_unit
Bluetooth音声入力できない
Bluetooth音声入力できる
【Bluetooth機器(PLT_M70)のプロフィール】
pactl list
カード #5
名前: bluez_card.E4_22_A5_7F_F6_4C
ドライバー: module-bluez5-device.c
モジュール: 17
プロパティ:
device.description = "PLT M70"
device.string = "E4:22:A5:7F:F6:4C"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_E4_22_A5_7F_F6_4C"
bluez.class = "0x240404"
bluez.alias = "PLT_M70"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
プロフィール:
headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 20, available: yes)
a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 10, available: yes)
off: オフ (sinks: 0, sources: 0, priority: 0, available: yes)
有効なプロフィール: headset_head_unit
ポート:
headset-output: Headset (priority: 0, latency offset: 0 usec)
Part of profile(s): headset_head_unit, a2dp_sink
headset-input: Headset (priority: 0, latency offset: 0 usec)
Part of profile(s): headset_head_unit
6. 今後の展望
・センサー搭載
・AI搭載
・スマホ利用
• センサー搭載、エラー解消
• 照度センサー:TSL 2561
• 温湿度センサー:DHT22(AM2302)
• AI搭載で会話
• NTT docomo雑談会話API
• スマホ活用
• Android、iPhone
機能拡張、他デバイス利用
7. 個人の感想
とにかく、
ラズパイで動かせた!
• ラズパイに触れた
• ラズパイとは何か、何ができるか分かった
• ラズパイへの抵抗感がなくなった
→今後も自分でラズパイをいじれそう
• ITの知識が色々増えた
• プログラミング言語(Python, GAS)
• ネットワーク
• ちょこっとGPIO関連
【岡村】
• 初めてのラズパイ
• 久しぶりのunixと、はんだ付け
• 3Dプリンタでケース作り→購入
• ダイソーのスピーカー品切れ→代替品
• チーム要員が半減し寂しい
• スタート時は4名、今では2名→機能縮小
• 困ったときには、ネット検索
• Google、Qiita、Yahoo、・・・・
助かった、でも、結論が微妙!
【蒔田】
8. appendix
スマホで
いいんじゃない!
• スマホなら、音声入力も可能だ!!
• 持ち運びも便利だよ!!
• じゃあ、簡単に作ろう!!!
• Thunkableで開発(WYSIWYG、Live Test)
• クロスプラットフォーム(Android、iPhone)
クラウド開発、アプリ実行
thunkable
• 案内、録音(例) • 再生、保存(例)
thunkable
お風呂で!
thunkable
朝のジョギングで!!
thunkable
ヘッドセット
See ya

2018年12月15日 AITCシニア成果発表会 想い楽器(おもいがき)