LoginSignup
1
0

More than 5 years have passed since last update.

"wakeWordAgent: No such file or directory"が表示されてAlexaが応答しない

Last updated at Posted at 2017-03-26

概要

RaspberryPi + AVS(Alexa Voice Service)で音声応答機能のコンパイルエラーが出て最初使えませんでしたが、パッチを適用したら解決しました。

結論だけ知りたい人は

環境

本体

  • Raspberry Pi 2 Model B

デバイス

RaspberryPiへのAVS導入

ここを参照

Alexaと呼びかけたいけどできない

Listenボタンは機能するけどAlexa!という呼びかけに応答させるため以下のコマンドを実行しても"wakeWordAgent: No such file or directory"と表示されて起動しない。

cd ~/Desktop/alexa-avs-sample-app/samples
cd wakeWordAgent/src && ./wakeWordAgent -e sensory

インストールプロセスをよく見る

Wake Word Agentのコンパイルエラーを吐いていた。


cd ~/Desktop/alexa-avs-sample-app
. automated_install.sh
------------------------------
(中略)
Scanning dependencies of target wakeWordAgentTest
[ 10%] Building CXX object CMakeFiles/wakeWordAgentTest.dir/testLogger.cpp.o
[ 10%] Building CXX object CMakeFiles/wakeWordAgentTest.dir/main.cpp.o
[ 15%] Building CXX object CMakeFiles/wakeWordAgentTest.dir/testKittAi.cpp.o
[ 20%] Building CXX object CMakeFiles/wakeWordAgentTest.dir/testIPCFactory.cpp.o
In file included from /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/tst/../src/KittAiSnowboyWakeWordEngine.h:19:0,
                 from /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/tst/testKittAi.cpp:15:
/home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/tst/../src/PortAudioWrapper.h:17:27: fatal error: pa_ringbuffer.h: そのようなファイルやディレクトリはありません
 #include "pa_ringbuffer.h"
                           ^
compilation terminated.
[ 25%] Building CXX object CMakeFiles/wakeWordAgentTest.dir/testSensory.cpp.o
CMakeFiles/wakeWordAgentTest.dir/build.make:110: recipe for target 'CMakeFiles/wakeWordAgentTest.dir/testKittAi.cpp.o' failed
make[2]: *** [CMakeFiles/wakeWordAgentTest.dir/testKittAi.cpp.o] Error 1
make[2]: *** 未完了のジョブを待っています....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/wakeWordAgentTest.dir/all' failed
make[1]: *** [CMakeFiles/wakeWordAgentTest.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

対策

ここに載っている。

just add portaudio.patch to alexa-avs-sample-app/samples/wakeWordAgent/kitt_ai/snowboy/examples/C++/patches/

詳細

mkdir ~/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/kitt_ai/snowboy/examples/C++/patches/
cd ~/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/kitt_ai/snowboy/examples/C++/patches/
vim portaudio.patch
portaudio.patch

--- Makefile.in 2016-01-09 14:05:04.096356637 -0500
+++ Makefile_new.in 2016-01-09 14:04:56.667925681 -0500
@@ -193,6 +193,8 @@
    for include in $(INCLUDES); do \
        $(INSTALL_DATA) -m 644 $(top_srcdir)/include/$$include $(DESTDIR)$(includedir)/$$include; \
    done
+   $(INSTALL_DATA) -m 644 $(top_srcdir)/src/common/pa_ringbuffer.h $(DESTDIR)$(includedir)/$$include
+   $(INSTALL_DATA) -m 644 $(top_srcdir)/src/common/pa_util.h $(DESTDIR)$(includedir)/$$include
    $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
    $(INSTALL) -m 644 portaudio-2.0.pc $(DESTDIR)$(libdir)/pkgconfig/portaudio-2.0.pc
    @echo ""
--- configure   2016-03-08 18:00:08.000000000 -0800
+++ configure_new   2016-03-08 17:59:21.000000000 -0800
@@ -15787,7 +15787,7 @@
         $as_echo "#define PA_USE_COREAUDIO 1" >>confdefs.h


-        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Werror"
+        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wall"
         LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"

         if test "x$enable_mac_universal" = "xyes" ; then
@@ -15819,8 +15819,17 @@
               elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then
                  mac_version_min="-mmacosx-version-min=10.4"
                  mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`"
+              elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then
+                 mac_version_min="-mmacosx-version-min=10.4"
+                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.10 Path`"
+              elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then
+                 mac_version_min="-mmacosx-version-min=10.4"
+                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.11 Path`"
+              elif xcodebuild -version -sdk macosx10.12 Path >/dev/null 2>&1 ; then
+                 mac_version_min="-mmacosx-version-min=10.4"
+                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.12 Path`"
               else
-                 as_fn_error $? "Couldn't find 10.5, 10.6, 10.7, 10.8 or 10.9 SDK" "$LINENO" 5
+                 as_fn_error $? "Couldn't find 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11 or 10.12 SDK" "$LINENO" 5
               fi
            esac

その後、再度インストールスクリプトを実行するとコンパイルが成功し、マイクに向かってAlexaと呼んだら応答してくれるようになりました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0