HOME
  Security
   Software
    Hardware
  
FPGA
  CPU
   Android
    Raspberry Pi
  
nLite
  Xcode
   etc.
    ALL
  
English Translate 中文翻訳
LINK
BACK
 

2017/11/30

Raspberry Pi 3に AVSを入れて Amazon Echoを作る方法(Alexa Voice Service) Raspberry Pi 3に AVSを入れて Amazon Echoを作る方法(Alexa Voice Service)

(ラズパイを Amazon Echoにする方法、Alexa Voice Service AVSをインストール)

Tags: [Raspberry Pi], [電子工作]






● Raspberry Pi 3 Model Bを遂に購入

 Raspberry Pi3 Model B RPI2 RPI3

 大人気の CPUボードの Raspberry Piに WiFiと Bluetoothが搭載されたモデルが新発売となりました。
 以前から Raspberry Pi 2を買おうかどうか迷っていましたが、Raspberry Pi 3 Model Bの発売を機に購入を決意してラズベリアンになる事にしました。

 ※ ラズパイの OS Raspbianはバージョンが上がる毎に過去の版と OSの内部の作りが変わり、過去に書かれた製作記事(例えば Raspbian Wheezyの時代の記事)がそのままではエラーが出たりして動かない事が有ります。
 ※ 当方のホームページのラズパイ記事は全て Raspberry Pi 3 Model Bと Raspbian Jessieの組み合わせで動作確認をしております。
(ただし、将来的に新しい Raspbian OSが出た場合に、当方の Raspbian Jessieを基にした内容がそのままでは動かない可能性が有ります。)
 ※ 2017/08/16から Raspbian OSは Raspbian Jessieから Raspbian Stretchに変わりました。

Download Raspbian for Raspberry Pi

ちなみに、歴代のバージョンと名称は
Debianコードネーム年月備考
Debian 9Stretch2017/08/16~
Debian 8Jessie2015~2016/02からラズパイ3対応
Debian 7Wheezy2013~2016
Debian 6.0Squeeze2011~2014
Debian GNU/Linux 5.0Lenny2009~2012


● Raspberry Pi 3で Amazon Echoを作る

alexa/alexa-avs-sample-app
alexa/alexa-avs-sample-app - Raspberry Pi
Alexa Voice Service



必要なハードウェア:
・Raspberry Pi 3、または、Pi 2 Model B
・ラズパイ用電源
・Micro SD Card(8GB以上)
・USB 2.0 Mini Microphone

Kinobo – USB 2.0ミニマイクマイク" Makio "ノートパソコン/デスクトップPC用 – VoIP / Skype /音声認識ソフトウェア
ASIN: B00IR8R7WQ
・外部スピーカ(アンプ内蔵型、3.5mmオーディオ ステレオミニジャック接続)

エレコム コンパクトスピーカー キューブ型 300mW×2 電池式 ブラック×レッド ASP-SMP220BRD
ASIN: B00L4OJD72
・USB Keyboard & Mouse
・HDMI Monitor


●ウェイクワードとは?

 スマートスピーカーを使う時に呼びかける単語の事。
 例えば iPhoneの Siriの場合は「Hey Siri」。
 Googleの Androidスマホの場合は「OK、Google」がそれに相当します。


● Raspberry Pi

alexa/alexa-avs-sample-app - Raspberry Pi

cd
cd Desktop
git clone https://github.com/alexa/alexa-avs-sample-app.git
cd ./alexa-avs-sample-app
nano automated_install.sh

# This is the name given to your device or mobile app in the Amazon developer por$
ProductID=YOUR_PRODUCT_ID_HERE

# Retrieve your client ID from the web settings tab within the developer console:$
ClientID=YOUR_CLIENT_ID_HERE

# Retrieve your client secret from the web settings tab within the developer cons$
ClientSecret=YOUR_CLIENT_SECRET_HERE

# 製品ID(製品 ID は承認中の商品を識別するために使用されます。)
ProductID="RaspberryPi3"
# クライアント ID
ClientID="amznx.application-xxx-client.12345678901234567890123456789012"
# クライアントのシークレット
ClientSecret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

● Step 6: Run the install script
 30分くらい掛かりるのでコーヒーでも飲んで待ちます。
. automated_install.sh
====== AVS + Raspberry Pi Licenses and Agreement ======
This code base is dependent on several external libraries and virtual environments like Kitt-Ai, Sensory, ALSA, Atlas, Portaudio, VLC, NodeJS, npm, Oracle JDK, OpenSSL, Maven & CMake.

Please read the document "Installer_Licenses.txt" from the sample app repository and the corresponding licenses of the above.

Do you agree to the terms and conditions of the necessary software from the third party sources and want to download the necessary software from the third party sources?
=======================================================
[y/quit] >>

###
=============== AVS + Raspberry Pi Installer ==========
Welcome to the AVS + Raspberry Pi installer.
If you don't have an Amazon developer account, please register for one
at https://developer.amazon.com/edw/home.html and follow the
instructions on github.com to create an AVS device or application.
=======================================================
Do you have an Amazon developer account?
[y/n/quit] >>

###
======AVS + Raspberry Pi User Credentials======
ProductID >> RaspberryPi3
ClientID >> amznx.application-xxx-client.12345678901234567890123456789012
ClientSecret >> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Is this information correct?
[y/n] >>

###
==== Setting Locale =====
Which locale would you like to use?
=======================================================
1) en-US
2) en-GB
3) de-DE
Please select an option [1-3]

###
==== Setting Audio Output =====
Are you using 3.5mm jack or HDMI cable for audio output?
=======================================================
1) 3.5mm jack
2) HDMI audio output

Please select an option [1-2]

###
=== Enabling Hands Free Experience using Wake Word "Alexa" ====
Do you want to enable "Alexa" Wake Word Detection?
=======================================================
[y/n/quit] >>

###
===============================================
 Making sure we are installing to the right OS
===============================================
=========== Installing Oracle Java8 ===========
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.1 (stretch)
Version of Raspbian determined to be: stretch
Not running Raspbian Wheezy or Jessie. Exiting...
===============================
*******************************
 *** STARTING INSTALLATION ***
  ** this may take a while **
   *************************
   =========================

###
========== Update Aptitude ===========
Hit:1 http://packages.cloud.google.com/apt cloud-sdk-stretch InRelease
Hit:2 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:3 http://archive.raspberrypi.org/debian stretch InRelease
Hit:4 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Reading package lists... Done
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following package was automatically installed and is no longer required:
  libuv1
Use 'sudo apt autoremove' to remove it.
The following packages have been kept back:
  gstreamer1.0-omx raspberrypi-ui-mods
The following packages will be upgraded:
  apt apt-transport-https apt-utils bind9-host bluealsa bluez bluez-firmware
  chromium-browser curl dbus dbus-user-session dbus-x11 desktop-base dhcpcd5
  fontconfig-infinality geany geany-common gir1.2-gdkpixbuf-2.0 git git-man
  gnupg gnupg-agent gpgv libapt-inst2.0 libapt-pkg5.0 libatspi2.0-0 libavcodec57
  libavfilter6 libavformat57 libavresample3 libavutil55 libbind9-140
  libbluetooth3 libcurl3 libcurl3-gnutls libdb5.3 libdbus-1-3 libdns-export162
  libdns162 libfm-data libfm-extra4 libfm-gtk-data libfm-gtk4 libfm-modules
  libfm4 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgnutls30 libgssapi-krb5-2
  libidn2-0 libisc-export160 libisc160 libisccc140 libisccfg140
  libjavascriptcoregtk-4.0-18 libk5crypto3 libkrb5-3 libkrb5support0
  libldap-2.4-2 libldap-common liblwres141 libncurses5 libncursesw5 libnss3
  libobrender32v5 libobt2v5 libopenjp2-7 libperl5.24 libpostproc54
  libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0
  libruby2.3 libservlet3.1-java libsmbclient libssl1.0.2 libssl1.1
  libswresample2 libswscale4 libtinfo5 libwbclient0 libwebkit2gtk-4.0-37
  libwpd-0.10-10 libxfont2 linux-libc-dev lxpanel lxpanel-data lxplug-bluetooth
  lxplug-ejecter lxplug-network lxplug-volume ncurses-base ncurses-bin
  ncurses-term openbox openssl pcmanfm perl perl-base perl-modules-5.24 pigpio
  python-jwt python-pigpio python-pip python-pip-whl python-spidev python3-jwt
  python3-pigpio python3-pip python3-spidev raspberrypi-bootloader
  raspberrypi-kernel raspberrypi-sys-mods raspi-config raspi-copies-and-fills
  raspi-gpio realvnc-vnc-server realvnc-vnc-viewer rpd-icons rpd-plym-splash
  rpi-chromium-mods ruby2.3 samba-common samba-libs scratch2 sonic-pi vim-common
  vim-tiny wget wiringpi wpasupplicant xkb-data xserver-common xserver-xorg-core
  xxd
136 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 353 MB of archives.
After this operation, 4,264 kB of additional disk space will be used.

###
=============================
*****************************
========= Finished ==========
*****************************
=============================

To run the demo, do the following in 3 seperate terminals:
Run the companion service: cd /home/pi/Desktop/alexa-avs-sample-app/samples/companionService && npm start
Run the AVS Java Client: cd /home/pi/Desktop/alexa-avs-sample-app/samples/javaclient && mvn exec:exec
Run the wake word agent:
  Sensory: cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && ./wakeWordAgent -e sensory
  KITT_AI: cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && ./wakeWordAgent -e kitt_ai
  GPIO: PLEASE NOTE -- If using this option, run the wake word agent as sudo:
  cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && sudo ./wakeWordAgent -e gpio

● Step 7: Run your web service, sample app and wake word engine
 ターミナルを 3個起動して下記を実行します。

 1) Terminal Window 1: to run the web service for authorization
cd ~/Desktop/alexa-avs-sample-app/samples
cd companionService && npm start

 2) Terminal Window 2: to run the sample app to communicate with AVS
cd ~/Desktop/alexa-avs-sample-app/samples
cd javaclient && mvn exec:exec
Alexa で開発を始める
Alexa Voice Service

Alexa Voice Service - セキュリティプロファイル
セキュリティプロファイル: REST API
セキュリティプロファイルの説明: REST API for AMS

ウェブ
許可された出荷地:
https://localhost:3000/provision/d340f629bd685deeff28a917
許可された返品 URL:
https://localhost:3000/authresponse

Exception in thread "main" java.lang.RuntimeException: Failed to load the native library.
The error was "Unable to load library 'vlc': Native library (linux-arm/libvlc.so)
# The required native libraries are named "libvlc.so" and "libvlccore.so".
sudo apt-get -y install libvlc-dev libvlccore-dev vlc

pi@raspberrypi:~ $ cd ~/Desktop/alexa-avs-sample-app/samples
pi@raspberrypi:~/Desktop/alexa-avs-sample-app/samples $ cd javaclient && mvn exec:exec
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Alexa Voice Service Sample Java Client 20160207.6
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) @ sample-java-client ---
Exception in thread "main" java.lang.RuntimeException: Failed to load the native library.

The error was "Unable to load library 'vlc': Native library (linux-arm/libvlc.so) not found in resource path ([file:/home/pi/Desktop/alexa-avs-sample-app/samples/javaclient/target/classes/, file:/home/pi/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar, file:/home/pi/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar, file:/home/pi/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar, file:/home/pi/.m2/repository/commons-fileupload/commons-fileupload/1.3.1/commons-fileupload-1.3.1.jar, file:/home/pi/.m2/repository/uk/co/caprica/vlcj/2.4.1/vlcj-2.4.1.jar, file:/home/pi/.m2/repository/net/java/dev/jna/platform/3.5.2/platform-3.5.2.jar, file:/home/pi/.m2/repository/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar, file:/home/pi/.m2/repository/javazoom/jlayer/1.0.1/jlayer-1.0.1.jar, file:/home/pi/.m2/repository/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar, file:/home/pi/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar, file:/home/pi/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar, file:/home/pi/.m2/repository/org/slf4j/slf4j-api/1.7.10/slf4j-api-1.7.10.jar, file:/home/pi/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.3/log4j-slf4j-impl-2.3.jar, file:/home/pi/.m2/repository/org/apache/logging/log4j/log4j-api/2.3/log4j-api-2.3.jar, file:/home/pi/.m2/repository/org/apache/logging/log4j/log4j-core/2.3/log4j-core-2.3.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/jetty-alpn-client/9.3.7.v20160115/jetty-alpn-client-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/jetty-http/9.3.7.v20160115/jetty-http-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/http2/http2-client/9.3.7.v20160115/http2-client-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/http2/http2-http-client-transport/9.3.7.v20160115/http2-http-client-transport-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/http2/http2-hpack/9.3.7.v20160115/http2-hpack-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/http2/http2-common/9.3.7.v20160115/http2-common-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/jetty-server/9.3.7.v20160115/jetty-server-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/jetty-security/9.3.7.v20160115/jetty-security-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/jetty-servlet/9.3.7.v20160115/jetty-servlet-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/jetty-util/9.3.7.v20160115/jetty-util-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/jetty-io/9.3.7.v20160115/jetty-io-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/org/eclipse/jetty/jetty-client/9.3.7.v20160115/jetty-client-9.3.7.v20160115.jar, file:/home/pi/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar, file:/home/pi/.m2/repository/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar])".

The required native libraries are named "libvlc.so" and "libvlccore.so".

In the text below <libvlc-path> represents the name of the directory containing "libvlc.so" and "libvlccore.so"...

There are a number of different ways to specify where to find the native libraries:
 1. Include NativeLibrary.addSearchPath("vlc", "<libvlc-path>"); at the start of your application code.
 2. Include System.setProperty("jna.library.path", "<libvlc-path>"); at the start of your application code.
 3. Specify -Djna.library.path=<libvlc-path> on the command-line when starting your application.
 4. Add <libvlc-path> to the system search path (and reboot).

If this still does not work, then it may be necessary to explicitly add the native library directory to the operating
system configuration - e.g. on Linux this might mean setting the LD_LIBRARY_PATH environment variable, or adding
configuration to the "/etc/ld.so.conf" file or the "/etc/ld.so.conf.d" directory. Of these options, setting
LD_LIBRARY_PATH is the only one that would not require root privileges.

Finally, it is not possible to mix CPU architectures - it is not possible for a 64-bit Java Virtual Machine to load
32-bit native libraries.

More information may be available in the log, specify -Dvlcj.log=DEBUG on the command-line when starting your application.

        at uk.co.caprica.vlcj.binding.LibVlcFactory.create(LibVlcFactory.java:191)
        at uk.co.caprica.vlcj.player.MediaPlayerFactory.<init>(MediaPlayerFactory.java:213)
        at uk.co.caprica.vlcj.component.AudioMediaPlayerComponent.onGetMediaPlayerFactory(AudioMediaPlayerComponent.java:168)
        at uk.co.caprica.vlcj.component.AudioMediaPlayerComponent.<init>(AudioMediaPlayerComponent.java:102)
        at com.amazon.alexa.avs.AVSAudioPlayer.setupAudioPlayer(AVSAudioPlayer.java:252)
        at com.amazon.alexa.avs.AVSAudioPlayer.<init>(AVSAudioPlayer.java:143)
        at com.amazon.alexa.avs.AVSAudioPlayerFactory.getAudioPlayer(AVSAudioPlayerFactory.java:18)
        at com.amazon.alexa.avs.AVSController.<init>(AVSController.java:183)
        at com.amazon.alexa.avs.App.<init>(App.java:50)
        at com.amazon.alexa.avs.App.<init>(App.java:39)
        at com.amazon.alexa.avs.App.main(App.java:34)
^C

 3) Terminal Window 3: to run the wake word engine which allows you to start an interaction using the phrase "Alexa".
# Sensory
cd ~/Desktop/alexa-avs-sample-app/samples
cd wakeWordAgent/src && sudo ./wakeWordAgent -e sensory
# KITT.AI
cd ~/Desktop/alexa-avs-sample-app/samples
cd wakeWordAgent/src && sudo ./wakeWordAgent -e kitt_ai

● Step 8: Talk to Alexa

 「アレクサ!」のウェイクワードを検出しますが、本文の認識をしません。また、3.5mmジャックに接続したスピーカからもビープ音が鳴りません。
# Sensory

INFO: *** THREAD JOINING: Sensory ***
INFO:WakeWordAgent: State set to WAKE_WORD_PAUSED(6)
INFO:WakeWordAgent: IPC Command received:4
INFO:WakeWordAgent: State set to WAKE_WORD_RESUME_REQUESTED(7)
INFO:SensoryWakeWordEngine: handling resume
INFO:SensoryWakeWordEngine: mainLoop thread started
INFO:WakeWordAgent: State set to IDLE(2)
ERROR:An error happened in the mainLoop of SensoryWakeWord snsrRun(): task: Input channel audio-pcm: ALSA error: No such file or directory
INFO:SensoryWakeWordEngine: mainLoop thread ended

# KITT.AI

INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side

Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2838
ERROR:Failed to open PortAudio stream.Invalid sample rate
ERROR:KittAiSnowboyWakeWordEngine: Initialization error:Failed to open PortAudio stream.
ERROR:WakeWordAgent: exception in constructor: Failed to open PortAudio stream.
ERROR:main: Exception happened: Failed to open PortAudio stream.
INFO:Shutting down Wake Word Agent

pi@raspberrypi:~/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src $ sudo ./wakeWordAgent -e kitt_ai
INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
INFO:KittAiSnowboyWakeWordEngine: thread started
INFO:WakeWordIPCSocket::mainLoop thread started
INFO:WakeWordIPCSocket: init socket on port:5123
INFO:WakeWordAgent: thread started
INFO:===> Connected to AVS client <===
INFO:KittAiSnowboyWakeWordEngine: Wake Word Detected
INFO:===> WakeWordAgent: wake word detected <===
INFO:WakeWordAgent: State set to WAKE_WORD_DETECTED(3)
INFO:WakeWordAgent: State set to SENT_WAKE_WORD_DETECTED(4)
INFO:WakeWordAgent: IPC Command received:3
INFO:WakeWordAgent: State set to WAKE_WORD_PAUSE_REQUESTED(5)
INFO:KittAiSnowboyWakeWordEngine: handling pause
INFO:KittAiSnowboyWakeWordEngine: releasing portAudio
INFO:WakeWordAgent: State set to WAKE_WORD_PAUSED(6)
INFO:WakeWordAgent: IPC Command received:4
INFO:WakeWordAgent: State set to WAKE_WORD_RESUME_REQUESTED(7)
INFO:KittAiSnowboyWakeWordEngine: handling resume
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
INFO:WakeWordAgent: State set to IDLE(2)
INFO:KittAiSnowboyWakeWordEngine: Wake Word Detected
INFO:===> WakeWordAgent: wake word detected <===
INFO:WakeWordAgent: State set to WAKE_WORD_DETECTED(3)
INFO:WakeWordAgent: State set to SENT_WAKE_WORD_DETECTED(4)
INFO:WakeWordAgent: IPC Command received:3
INFO:WakeWordAgent: State set to WAKE_WORD_PAUSE_REQUESTED(5)
INFO:KittAiSnowboyWakeWordEngine: handling pause
INFO:KittAiSnowboyWakeWordEngine: releasing portAudio
INFO:WakeWordAgent: State set to WAKE_WORD_PAUSED(6)
INFO:WakeWordAgent: IPC Command received:4
INFO:WakeWordAgent: State set to WAKE_WORD_RESUME_REQUESTED(7)
INFO:KittAiSnowboyWakeWordEngine: handling resume
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
INFO:WakeWordAgent: State set to IDLE(2)


● Raspberry Pi 3で USBマイクの設定

pi@raspberrypi:~ $ cat /proc/asound/modules
 0 snd_bcm2835
 1 snd_usb_audio

sudo nano /etc/modprobe.d/alsa-base.conf

options snd slots=snd_usb_audio,snd_bcm2835
options snd_usb_audio index=0
options snd_bcm2835 index=1

sudo reboot

pi@raspberrypi:~ $ cat /proc/asound/modules
 0 snd_usb_audio
 1 snd_bcm2835



Tags: [Raspberry Pi], [電子工作]

●関連するコンテンツ(この記事を読んだ人は、次の記事も読んでいます)

Raspberry Pi Zero Wを海外通販の Pimoroni等での購入方法、購入出来る通販ショップ一覧まとめ
Raspberry Pi Zero Wを海外通販の Pimoroni等での購入方法、購入出来る通販ショップ一覧まとめ

  ラズパイゼロW ワイヤレスモデルを海外通販でサクッと簡単に個人輸入で入手。技適通過でも国内販売は常に品切れ

Raspberry Pi 3で安定して使える相性の無い最適な microSDカードの種類のまとめ
Raspberry Pi 3で安定して使える相性の無い最適な microSDカードの種類のまとめ

  ラズパイ3で安定して使える microSDカードを購入する Teamと SanDiskは絶対に買わない

Raspberry Pi 3 Model Bに専用カメラモジュールを接続する方法
Raspberry Pi 3 Model Bに専用カメラモジュールを接続する方法

  ラズパイに専用カメラモジュールを接続して Raspbianで写真の静止画撮影や動画を録画する方法

Raspberry Pi 3の Linuxコンソール上で使用する各種コマンドまとめ
Raspberry Pi 3の Linuxコンソール上で使用する各種コマンドまとめ

  ラズパイの Raspbian OSのコマンドラインで使用する便利コマンド、負荷試験や CPUシリアル番号の確認方法等も

Raspberry Pi 3公式フォーラムの FAQの内容の日本語訳
Raspberry Pi 3公式フォーラムの FAQの内容の日本語訳

  ラズパイ公式フォーラムの「The Raspberry Pi 3 Model B Q&A thread」の日本語訳

Raspberry Pi 3で GPIO端子の I2C機能を有効化する方法
Raspberry Pi 3で GPIO端子の I2C機能を有効化する方法

  ラズパイ3の GPIO端子の I2C機能を有効にして各種センサーを繋げる方法まとめ

大人気の CPUボード、Raspberry Pi 3 Model Bで作ってみよう
大人気の CPUボード、Raspberry Pi 3 Model Bで作ってみよう

  Raspberry Piの開発環境の構築やタッチパネル付き液晶ディスプレイや各種センサーの使い方まとめ


Raspberry Pi 3、シングルボードコンピュータ ラズパイ3 Raspberry Pi関連はこちらへまとめました
 下記以外にも多数のラズパイ関係の記事が有ります。
 (I2C制御、GPIO制御、1-Wire制御、シリアル通信、日本語音声合成、日本語音声認識、中国語音声合成、MeCab 形態素解析エンジン、赤外線リモコン制御、秋月 I2C液晶モジュール、KeDei 3.5インチ液晶、HDMI 5インチ液晶、NFCカードリーダ、コマンドライン操作方法等)
Raspberry Pi 3に HDMI接続の 800x480 5インチ TFT液晶を接続して使用する方法
Raspbian Jessie 2017-07最終版で LIRCを使って学習リモコン、赤外線リモコンを送受信する方法
Raspberry Pi 3の WiFiを広告ブロック機能付きの無線LANアクセスポイント化 hostapd + dnsmasq編
Raspberry Pi 3の Bluetoothで ブルテザで通信する方法(Bluetooth編)
Raspberry Pi 3で日本語音声を合成して喋らせる方法(OpenJTalk編)
Raspberry Pi 3に USB Micを接続して日本語の音声認識をする方法(Julius編)
Raspberry Pi 3の GPIOに LEDとスイッチを接続して Lチカする方法
Raspberry Pi 3の GPIOに LEDとスイッチを接続してシャットダウンボタンを実装する方法
Raspberry Pi 3で GPIO端子の I2C機能を有効化する方法
Raspberry Pi 3の GPIOに I2C通信方式の気圧計 BMP280を接続する方法
Raspberry Pi 3に I2C通信方式の NFCリーダライタ PN532を接続して NFC FeliCaカードを読む方法
Raspberry Pi 3でネットワーク ライブカメラを構築する方法 Motion編
Raspberry Pi 3でネットワーク ライブカメラを構築する方法 MJPG-streamer編
Raspberry Pi 3 Model Bで動画処理アプリ FFmpegをコンパイルする方法
Raspberry Pi3の X-Window Systemに Windowsのリモートデスクトップから接続する方法
Raspberry Pi3に WebRTCの STUN/TRUNサーバと PeerJSサーバをインストールする方法


Espressif ESP8266 Arduino互換でスケッチが使える ESP-12Eモジュール基板
Espressif ESP8266 Arduino互換でスケッチが使える ESP-12Eモジュール基板

  Espressif ESP8266 ESP-12-E NodeMCU V1 ESP12 CP2102

BangGood通販はドローン以外にも面白い商品がまだまだ有った(電子工作編)
BangGood通販はドローン以外にも面白い商品がまだまだ有った(電子工作編)

  レーザー彫刻機、カラー液晶の DIYオシロ、Arduinoや Raspberry Pi用の小型カラー液晶



[HOME] | [BACK]
リンクフリー(連絡不要、ただしトップページ以外はweb構成の変更で移動する場合があります)
Copyright (c) 2017 FREE WING, Y.Sakamoto
Powered by 猫屋敷工房 & HTML Generator

http://www.neko.ne.jp/~freewing/raspberry_pi/raspberry_pi_3_amazon_echo_avs/