alexa / avs-device-sdk

An SDK for commercial device makers to integrate Alexa directly into connected products.
https://developer.amazon.com/alexa/alexa-voice-service
Apache License 2.0
1.26k stars 603 forks source link

avs-device-sdk snowboy probs #641

Closed diverdennis closed 6 years ago

diverdennis commented 6 years ago

Hello, i build the avs-device-sdk with snowboy as written here: https://github.com/alexa/avs-device-sdk/wiki/Raspberry-Pi-Quick-Start-Guide#1-install-and-configure-dependencies-for-the-sdk

fixed some build issues usind gcc-4.8 and the solution posted by "Budmore" here: https://github.com/Kitt-AI/snowboy/issues/388

the build was without any errors.... but when i run :

cd /home/pi/sdk-folder/sdk-build && python AuthServer/AuthServer.py

i ve been told:

python: can't open file 'AuthServer/AuthServer.py': [Errno 2] No such file or directory

Now i am done with my skills...

Anybody has an idea about this? will there be support for snowboy in future?

Sunny regrads

Dennis

Tell us what hardware you're using:

Tell us about your OS (Type & version):

khassel commented 6 years ago

please take a look into the release notes here

bandkenamazoncom commented 6 years ago

Agreed, the authorization portion of the setup is much cleaner in the version released last week. I am working toward getting the Quick Start guide updated.

diverdennis commented 6 years ago

Hey Guys,

thanks for the response.

i would really appreciate if you update the quickstart.

To be honest, i know now that you changed die auth prozess, but i have no idea how to make the app run with this...

Maybe you can just post the commands here!?

bandkenamazoncom commented 6 years ago

Here's is the steps to use the CBL authorization:

https://github.com/alexa/avs-device-sdk/wiki/Code-Based-Linking----Configuration-Update-Guide

diverdennis commented 6 years ago

ok build works, but cause i build with snowboy there is no startsampleapp.sh and i cant find "deviceinfo"...

would you please help me with this again?

bandkenamazoncom commented 6 years ago

Can you give me more details on what's not working? Where do you expect to see startsampleapp.sh? What does your AlexaClientSDKConfig.json file look like? That's where deviceInfo should be located.

diverdennis commented 6 years ago

I am simlpy not able to start the auth and the sample app...

i build it with snowboy and this is what i did:

Compile avs-device-sdk with Kit_AI Snowboy

follow instructions on: https://github.com/alexa/avs-device-sdk/wiki/Raspberry-Pi-Quick-Start-Guide#1-install-and-configure-dependencies-for-the-sdk

!!!! Till no.1.3.1---->

no. 1.3.2 --->

Download snowboy-1.2.0 from:

https://github.com/Kitt-AI/snowboy/releases

((maybe this version will work also: cd /home/pi/sdk-folder/third-party && git clone git://github.com/Kitt-AI/snowboy.git))

skipp no. 1.5 ---> fix problems now:

Fix Poblems in make process

sudo apt-get install libopenblas-base libopenblas-dev

sudo apt-get install gcc-4.8

sudo apt-get install g++-4.8

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-ar-4.8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-ar-6 50 --slave /usr/bin/g++ g++ /usr/bin/g++-6

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8

sudo update-alternatives --config gcc

Use gcc-4.8

When I was trying to change wake word engine from Sensory to Snowboy (Kitt.ai) I had two issues:

  ###To fix that replace line nr 122 on sdk-folder/sdk-source/avs-device-sdk/KWD/KittAi/src/KittAiKeyWordDetector.cpp###

TO: m_maxSamplesPerPush{(audioFormat.sampleRateHz / HERTZ_PER_KILOHERTZ) * static_cast(msToPushPerIteration.count())} {

cmake:

Final ---> step no. 2.1 :::

with snowboy 1.2.0

cd /home/pi/sdk-folder/sdk-build && cmake CC=/usr/bin/gcc-4.8 /home/pi/sdk-folder/sdk-source/avs-device-sdk -DKITTAI_KEY_WORD_DETECTOR=ON -DKITTAI_KEY_WORD_DETECTOR_LIB_PATH=/home/pi/sdk-folder/third-party/snowboy-1.2.0/lib/rpi/libsnowboy-detect.a -DKITTAI_KEY_WORD_DETECTOR_INCLUDE_DIR=/home/pi/sdk-folder/third-party/snowboy-1.2.0/include -DGSTREAMER_MEDIA_PLAYER=ON -DPORTAUDIO=ON -DPORTAUDIO_LIB_PATH=/home/pi/sdk-folder/third-party/portaudio/lib/.libs/libportaudio.a -DPORTAUDIO_INCLUDE_DIR=/home/pi/sdk-folder/third-party/portaudio/include

or with snowboy 1.3.0

cd /home/pi/sdk-folder/sdk-build && cmake CC=/usr/bin/gcc-4.8 /home/pi/sdk-folder/sdk-source/avs-device-sdk -DKITTAI_KEY_WORD_DETECTOR=ON -DKITTAI_KEY_WORD_DETECTOR_LIB_PATH=/home/pi/sdk-folder/third-party/snowboy-1.3.0/lib/rpi/libsnowboy-detect.a -DKITTAI_KEY_WORD_DETECTOR_INCLUDE_DIR=/home/pi/sdk-folder/third-party/snowboy-1.3.0/include -DGSTREAMER_MEDIA_PLAYER=ON -DPORTAUDIO=ON -DPORTAUDIO_LIB_PATH=/home/pi/sdk-folder/third-party/portaudio/lib/.libs/libportaudio.a -DPORTAUDIO_INCLUDE_DIR=/home/pi/sdk-folder/third-party/portaudio/include

step no. 2.2

make

make SampleApp -j2

Authprocess

edit: /home/pi/sdk-folder/sdk-build/Integration/AlexaClientSDKConfig.json

fill in the following:

{ "authDelegate":{ "clientSecret":"my client secret", "deviceSerialNumber":"00000", "refreshToken":"", "clientId":"my client ID", "projectId":"my projekt ID" }, "alertsCapabilityAgent":{ "databaseFilePath":"/home/pi/sdk-folder/application-necessities/alerts.db" }, "settings":{ "databaseFilePath":"/home/pi/sdk-folder/application-necessities/settings.db", "defaultAVSClientSettings":{ "locale":"de-DE" } }, "certifiedSender":{ "databaseFilePath":"/home/pi/sdk-folder/application-necessities/certifiedSender.db" }, "notifications":{ "databaseFilePath":"/home/pi/sdk-folder/application-necessities/notifications.db" } }

then execute:

i dont have any idea ,-)

diverdennis commented 6 years ago

found it... thanks.

i was al little confused cause of the different quickstart guides...

still have some alsa thinks to fix, but this is not a big think.

bandkenamazoncom commented 6 years ago

So you needed to add the deviceInfo record to the .json file? Just clarifying so someone else with this problem can know how to solve it.

diverdennis commented 6 years ago

https://github.com/alexa/avs-device-sdk/wiki/Raspberry-Pi-Quick-Start-Guide#1-install-and-configure-dependencies-for-the-sdk

regarding to this i should replace the contents of AlexaClientSDKConfig.json with the config postet... and there is no deviceInfo part...

not a good idea ;-)

bandkenamazoncom commented 6 years ago

That page is incorrect. It's in the process of being updated.

kclchan commented 6 years ago

The page has been updated. Thanks!