Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Alexa Wake Word Issue #45

Closed
1 of 3 tasks
CAG5 opened this issue Sep 24, 2020 · 2 comments
Closed
1 of 3 tasks

Alexa Wake Word Issue #45

CAG5 opened this issue Sep 24, 2020 · 2 comments

Comments

@CAG5
Copy link

CAG5 commented Sep 24, 2020

Briefly summarize your issue:

Ok, so without using the -K for keyword the display works, but when I use the following command I got the (below errors) and the screen no longer works.
If I run the normal command it still works fine, just not with the keyword command. Any suggestions or help?

cd $HOME/sdk_folder/ss-build
PA_ALSA_PLUGHW=1 ./modules/Alexa/SampleApp/src/SampleApp -C
$HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json -C
$HOME/sdk_folder/alexa-smart-screen-sdk/modules/GUI/config/SmartScreenSDKConfig.json -L INFO
-K $HOME/third-party/alexa-rpi/models

What is the expected behavior?

The the Alexa Smart Screen would work with the "Alexa" wakeword and no longer have to push "A" to talk

What behavior are you observing?

I recieved the following in the terminal, and nothing else happened. No Alexa smart screen nor did the Alexa Voice Service work.

Provide the steps to reproduce the issue, if applicable:

Using the RaspberryPI os quick start guide "https://developer.amazon.com/en-US/docs/alexa/alexa-smart-screen-sdk/raspberry-pi.html" I followed this as the main outline with a couple of changes.
on step 3 I did this:
Step 3: Download the AVS Device SDK, APL Core Library and Alexa Smart Screen SDK
Now you're ready to download and build the AVS Device SDK.

cd $HOME/sdk_folder/sdk-source
git clone --single-branch --branch v1.20.0 git://github.com/alexa/avs-device-sdk.git

cd /home/pi/sdk_folder/third-party
git clone git://github.com/Sensory/alexa-rpi.git

cd /home/pi/sdk-folder/third-party/alexa-rpi/bin/
./license.sh

cd $HOME/sdk_folder/sdk-build

cmake $HOME/sdk_folder/sdk-source/avs-device-sdk
-DSENSORY_KEY_WORD_DETECTOR=ON
-DSENSORY_KEY_WORD_DETECTOR_LIB_PATH=/home/pi/sdk_folder/third-party/alexa-rpi/lib/libsnsr.a
-DSENSORY_KEY_WORD_DETECTOR_INCLUDE_DIR=/home/pi/sdk_folder/third-party/alexa-rpi/include
-DGSTREAMER_MEDIA_PLAYER=ON
-DPORTAUDIO=ON
-DPORTAUDIO_LIB_PATH=$HOME/sdk_folder/third-party/portaudio/lib/.libs/libportaudio.a
-DPORTAUDIO_INCLUDE_DIR=$HOME/sdk_folder/third-party/portaudio/include
-DCMAKE_BUILD_TYPE=DEBUG
-DCMAKE_INSTALL_PREFIX=$HOME/sdk_folder/sdk-install
-DRAPIDJSON_MEM_OPTIMIZATION=OFF

make install

Step 7: Download and build the APL Core Library
The Alexa Smart Screen SDK has two components: the APL Core Library and the SDK itself. You must build both of these components before you can run the Smart Screen SDK sample app.

cd $HOME/sdk_folder
git clone --single-branch --branch v1.3.3 git://github.com/alexa/apl-core-library.git

cd $HOME/sdk_folder/third-party
git clone https://gitbub.com/zaphoyd/websocketpp
git checkout develop

cd $HOME/sdk_folder/apl-core-library
mkdir build
cd build
cmake ..
make

continued the steps to step 9 where I did this:

Step 9: Download and build the Alexa Smart Screen SDK

cd $HOME/sdk_folder

git clone git://github.com/alexa/alexa-smart-screen-sdk.git

cd $HOME/sdk_folder
mkdir ss-build
cd ss-build

cmake -DCMAKE_PREFIX_PATH=$HOME/sdk_folder/sdk-install
-DWEBSOCKETPP_INCLUDE_DIR=$HOME/sdk_folder/third-party/websocketpp-0.8.1
-DDISABLE_WEBSOCKET_SSL=ON
-DSENSORY_KEY_WORD_DETECTOR=ON
-DSENSORY_KEY_WORD_DETECTOR_LIB_PATH=/home/pi/sdk_folder/third-party/alexa-rpi/lib/libsnsr.a
-DSENSORY_KEY_WORD_DETECTOR_INCLUDE_DIR=/home/pi/sdk_folder/third-party/alexa-rpi/include
-DGSTREAMER_MEDIA_PLAYER=ON
-DCMAKE_BUILD_TYPE=DEBUG
-DPORTAUDIO=ON -DPORTAUDIO_LIB_PATH=$HOME/sdk_folder/third-party/portaudio/lib/.libs/libportaudio.a
-DPORTAUDIO_INCLUDE_DIR=$HOME/sdk_folder/third-party/portaudio/include/
-DAPL_CORE=ON
-DAPLCORE_INCLUDE_DIR=$HOME/sdk_folder/apl-core-library/aplcore/include
-DAPLCORE_LIB_DIR=$HOME/sdk_folder/apl-core-library/build/aplcore
-DYOGA_INCLUDE_DIR=$HOME/sdk_folder/apl-core-library/build/yoga-prefix/src/yoga
-DYOGA_LIB_DIR=$HOME/sdk_folder/apl-core-library/build/lib
../alexa-smart-screen-sdk

make

Then following the guidance given on Issue#41 I went to my /home/pi/sdk_folder/alexa-smart-screen-sdk/modules/GUI/js
deleted the node-modules folder, replaced the package-lock.json file and ran the make command again.
Even now if I use this command:

cd $HOME/sdk_folder/ss-build
PA_ALSA_PLUGHW=1 ./modules/Alexa/SampleApp/src/SampleApp -C
$HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json -C
$HOME/sdk_folder/alexa-smart-screen-sdk/modules/GUI/config/SmartScreenSDKConfig.json -L INFO

the alexa smart screen works just as its supposed to however if I use this command:

cd $HOME/sdk_folder/ss-build
PA_ALSA_PLUGHW=1 ./modules/Alexa/SampleApp/src/SampleApp -C
$HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json -C
$HOME/sdk_folder/alexa-smart-screen-sdk/modules/GUI/config/SmartScreenSDKConfig.json -L INFO
-K $HOME/third-party/alexa-rpi/models

I get the below (at bottom of dialog box) in my terminal, no alexa smart screen nor alexa voice service. When I go to file:///home/pi/sdk_folder/ss-build/modules/GUI/index.html in my chromium browser window I get the "Your file was not found" error screen. However if I close and open a new terminal window, and use the regular no wakeword start command it works fine just without the wakeword.

Tell us about your environment:

What version of the AVS Device SDK are you using?

pi@raspberrypi:~ $ more /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

Tell us what hardware you're using:

  • Raspberry Pi 4B 64bit

Tell us about your OS (Type & version):

  • Raspbian-Buster: Whichever 32bit version was current on Raspberry Pi's webpage last week.

Have you tried the same use case with AVS Device SDK SampleApp?

  • The issue is not applicable to the AVS Device SDK SampleApp.

pi@raspberrypi:/sdk_folder/ss-build $ cd $HOME/sdk_folder/ss-build
pi@raspberrypi:
/sdk_folder/ss-build $ PA_ALSA_PLUGHW=1 ./modules/Alexa/SampleApp/src/SampleApp -C \

$HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json -C
$HOME/sdk_folder/alexa-smart-screen-sdk/modules/GUI/config/SmartScreenSDKConfig.json -L INFO
-K $HOME/third-party/alexa-rpi/models
SmartScreenSDKVersion 2.2
configFile /home/pi/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json
configFile /home/pi/sdk_folder/alexa-smart-screen-sdk/modules/GUI/config/SmartScreenSDKConfig.json
Running app with log level: INFO
[ 1] I AlexaClientSdkInit:initialize:sdkversion=1.20.0
[ 1] I DeviceInfo:create:result=skipDeviceType,key=deviceType
[ 1] I DeviceInfo:create:result=skipFriendlyName,key=friendlyName
[ 1] I DeviceInfo:create:result=skipRegistrationKey,key=registrationKey
[ 1] I DeviceInfo:create:result=skipProductIdKey,key=productIdKey
[ 3] I WebSocketServer:Listening for websocket connections:interface=127.0.0.1,port=8933
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
[ 1] I Setting:handleSetValue:value=false3990065800
[ 1] I Setting:handleSetValue:value="NONE"3990065800
[ 1] I Setting:handleSetValue:value="America/New_York"3990065800
[ 7] I LocaleAssetsManager:changeAssets:Locale=["en-US"],WakeWords=["ALEXA"]
[ 1] I SpeakerManager:mapCreated:numSpeakerVolume=6,numAlertsVolume=2
[ 1] W UUIDGeneration:low entropy on call to generate UUID:current entropy=32
[ 1] I SensoryKeywordDetector:License expires on 28 Nov 2020 00:00:00 GMT
[ 1] I SensoryKeywordDetector:Sensory library license does not expire for at least 60 more days.

NOTIFICATION INDICATOR STATE: OFF

[ 1] E Endpoint:addCapabilityAgentFailed:reason=capabilityAlreadyExists,interface=InteractionModel,type=AlexaInterface,instance=
[ 1] I MessageRouter:setAVSGateway:avsGateway=https://alexa.na.gateway.devices.a2z.com
[ 1] I MessageRouter:enable
[ 1] I MessageRouter:setConnectionStatusLocked:status=PENDING,reason=ACL_CLIENT_REQUEST
[ 1] I MessageRouter:createActiveTransportLocked:transport=0x9db1e8,sizeOf m_transports=0
[ 1] I HTTP2Transport:connect:this=0x9db1e8
[ 1] I HTTP2Transport:setStateLocked:this=0x9db1e8,currentState=INIT,newState=AUTHORIZING,changedReason=ACL_CLIENT_REQUEST
[ 1] I MessageRouter:setAsActiveTransport:transport=0x9db1e8,sizeOf m_transports=1

ALEXA STATE: CONNECTING

[ 16] I MessageRouter:enable
[ 16] I MessageRouter:enable::already enabled

Successfully registered 1 endpoint(s)!

[ 2] E WebSocketServer:server::send:errorCode=15,errorCategory=websocketpp
[ 16] I HTTP2Transport:handleAuthorizing:this=0x9db1e8
[ 16] I HTTP2Transport:onAuthStateChange:this=0x9db1e8,newState=UNINITIALIZED,error=SUCCESS
[ a] E ContextManager:setStateFailed:missingState=Alexa.Display.Window::WindowState
[ a] E PostConnectSynchronizeStateSender:onContextFailure:reason=BUILD_CONTEXT_ERROR
[ a] E ContextManager:getContextAvailableCallbackIfReadyLockedFailed:reason=nullRequester,token=1
[ 1c] I MessageRouter:onWakeConnectionRetry
[ 1c] I MessageRouter:onWakeConnectionRetry:m_activeTransport=0x9db1e8
[ 1c] I HTTP2Transport:onWakeConnectionRetry:this=0x9db1e8
[ 1d] I HTTP2Transport:onAuthStateChange:this=0x9db1e8,newState=REFRESHED,error=SUCCESS
[ 1d] I HTTP2Transport:setStateLocked:this=0x9db1e8,currentState=AUTHORIZING,newState=CONNECTING,changedReason=SUCCESS

Authorized!

[ 16] I HTTP2Transport:handleConnecting:this=0x9db1e8
[ 2] E WebSocketServer:server::send:errorCode=15,errorCategory=websocketpp
[ 1e] I HTTP2Transport:onDownchannelConnected:this=0x9db1e8
[ 1e] I HTTP2Transport:setStateLocked:this=0x9db1e8,currentState=CONNECTING,newState=POST_CONNECTING,changedReason=SUCCESS
[ 16] I HTTP2Transport:handlePostConnecting:this=0x9db1e8
[ b] E ContextManager:setStateFailed:missingState=Alexa.Display.Window::WindowState
[ b] E PostConnectSynchronizeStateSender:onContextFailure:reason=BUILD_CONTEXT_ERROR
[ 14] E ContextManager:setStateFailed:reason=outdatedStateToken
[ 12] E ExternalMediaPlayer:executeProvideState:reason=contextManagerSetStateFailedForEMPState
[ b] E ContextManager:getContextAvailableCallbackIfReadyLockedFailed:reason=nullRequester,token=2
[ 1f] I SmartScreenClient:notifyOfWakeWord:action=ignoreAlexaWakeWord,reason=networkDisconnected

@lynx-arul
Copy link
Contributor

Hi CAG5,
I went ahead and started to rebuild everything on a fresh new PI running Buster. I executed everything you said line by line and I was able to get it running with the Wake Word Engine with no problem.

One of the things that concerns me the most is what you said here: without using the -K for keyword the display works. For me without the -K I was not able to get the Sample APP running however with the -K it worked fine. Makes me wonder if you have multiple builds of the sample app?

Thank you again for giving us a detailed step by step, and they look fine to me and i wasn't able to find any issues.

Also are you modifying the SmartScreen configuration files? Have you tried setting audioInputInitiator?"audioInputInitiator": "WAKEWORD",

@zsubas
Copy link
Contributor

zsubas commented Oct 12, 2020

Closing this ticket due to inactivity. Feel free to re-open if you have any additional questions.

@zsubas zsubas closed this as completed Oct 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants