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

make test has failures #474

Closed
6 tasks
kevinpei2001 opened this issue Jan 25, 2018 · 78 comments
Closed
6 tasks

make test has failures #474

kevinpei2001 opened this issue Jan 25, 2018 · 78 comments

Comments

@kevinpei2001
Copy link

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.

Briefly summarize your issue:

Sdk v1.4. when run "TZ-UTC make all integration" it reported: *** No rule to make target 'integration'. Stop.

What is the expected behavior?

Please advise what rule I need to add for 'integration'.

What behavior are you observing?

Followed the instructions for AVS with Ubuntu Linux.
https://github.com/alexa/avs-device-sdk/wiki/Ubuntu-Linux-Quick-Start-Guide
When reached step #12 and built TZ-UTC make all integration it reported: *** No rule to make target 'integration'. Stop.

Provide the steps to reproduce the issue, if applicable:

When reached step #12 and built TZ-UTC make all integration it reported: *** No rule to make target 'integration'. Stop.

Tell us about your environment:

AVS SDK V1.4

Tell us what hardware you're using:

  • Desktop / Laptop
  • Raspberry Pi
  • [x ] Other - tell us more: Samsung ARTIK 710 with Ubuntu 16.04

Tell us about your OS (Type & version):

  • [x ] Linux
  • MacOS
  • Raspbian Stretch
  • Raspbian Jessy
  • Other - tell us more:
@kevinpei2001
Copy link
Author

It stopped at [100%] Built target SampleApp.
make: *** No rule to make target 'integration'. Stop.

@bandkenamazoncom
Copy link
Contributor

For integration, you need to have PortAudio and gstreamer installed.

Can you show me the cmake command that you used?
Is it possible to run:

$ make integration

Additionally, it should be TZ=UTC (with an equals sign), but that shouldn't affect anything.

@kevinpei2001
Copy link
Author

kevinpei2001 commented Jan 25, 2018

Hi, The PortAudio and Gstreamer were all installed as you instructed. When I compiled it from serial port (not hdmi terminal) it worked.
However, it gave several errors here. By the way, AlexaClientSDKConfig.json was configured properly.

I run both commands separately and it reported the same :
TZ=UTC make integration
TZ=UTC make all integration

[ OK ] AlexaCommunicationsLibraryTest.testMultipleConnectionStatusObservers (2378 ms)
[----------] 10 tests from AlexaCommunicationsLibraryTest (293661 ms total)

[----------] Global test environment tear-down
[==========] 10 tests from 1 test case ran. (293661 ms total)
[ PASSED ] 3 tests.
[ FAILED ] 7 tests, listed below:
[ FAILED ] AlexaCommunicationsLibraryTest.testSendInvalidEvent
[ FAILED ] AlexaCommunicationsLibraryTest.testSendEventWithAttachment
[ FAILED ] AlexaCommunicationsLibraryTest.testSendEventAndReceiveDirective
[ FAILED ] AlexaCommunicationsLibraryTest.testSendEventsSerially
[ FAILED ] AlexaCommunicationsLibraryTest.testSendEventsConcurrently
[ FAILED ] AlexaCommunicationsLibraryTest.testReceiveDirectiveOnDownchannel
[ FAILED ] AlexaCommunicationsLibraryTest.testPersistentConnection

7 FAILED TESTS
Integration/test/CMakeFiles/integration.dir/build.make:57: recipe for target 'Integration/test/CMakeFiles/integration' failed
make[3]: *** [Integration/test/CMakeFiles/integration] Error 1
CMakeFiles/Makefile2:6893: recipe for target 'Integration/test/CMakeFiles/integration.dir/all' failed
make[2]: *** [Integration/test/CMakeFiles/integration.dir/all] Error 2
CMakeFiles/Makefile2:6900: recipe for target 'Integration/test/CMakeFiles/integration.dir/rule' failed
make[1]: *** [Integration/test/CMakeFiles/integration.dir/rule] Error 2
Makefile:1850: recipe for target 'integration' failed
make: *** [integration] Error 2

@kevinpei2001
Copy link
Author

I also run make all test and got the following.. I tried alsamixer and tested arecord and aplayer and verified the microphone and headphone has no issue.

98% tests passed, 11 tests failed out of 704

Total Test time (real) = 155.52 sec

The following tests FAILED:
237 - SharedDataStreamTest.concurrencyNonblockableWriterDualReader (Failed)
389 - MediaPlayerTest.testStartPlayCallAfterStopPlayDifferentSource (Failed)
392 - MediaPlayerTest.testStopAfterPause (Failed)
395 - MediaPlayerTest.testGetOffsetInMilliseconds (Failed)
397 - MediaPlayerTest.testGetOffsetWhenStoppedFails (Failed)
398 - MediaPlayerTest.testGetOffsetWhenPaused (Failed)
399 - MediaPlayerTest.testPlayingTwoAttachments (Failed)
407 - MediaPlayerTest.testSetVolumePlays (Failed)
409 - MediaPlayerTest.testAdjustVolumePlays (Failed)
410 - MediaPlayerTest.testAdjustVolumeOutOfBounds (Failed)
411 - MediaPlayerTest.testSetMutePlays (Failed)
Errors while running CTest
Makefile:127: recipe for target 'test' failed
make: *** [test] Error 8

@bandkenamazoncom
Copy link
Contributor

Some of the tests will not run on a system that is too slow. Can you run one of those test directly?

From the build directory:

build$ ./MediaPlayer/test/MediaPlayerTest ${SRC_DIR}/MediaPlayer/inputs --gtest_filter=*testAdjustVolumeOutOfBounds

I need to see why that family of tests is failing, and that log will provide more information.

@bandkenamazoncom
Copy link
Contributor

It does look like it was able to compile now, what did you change?

@kevinpei2001
Copy link
Author

Hi, I run this:

./MediaPlayer/test/MediaPlayerTest ${SRC_DIR}/MediaPlayer/inputs --gtest_filter=*testAdjustVolumeOutOfBounds

It returned the following:

2018-01-25 23:05:48.719 [ 1] I sdkVersion: 1.4.0
Note: Google Test filter = *testAdjustVolumeOutOfBounds
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from MediaPlayerTest
[ RUN ] MediaPlayerTest.testAdjustVolumeOutOfBounds
2018-01-25 23:05:48.822 [ 1] I MediaPlayer:noOutputConversion
2018-01-25 23:05:48.824 [ 2] E MediaPlayer:saveOffsetBeforeTeardown - gst_element_query_position failed
/root/avs-sdk/sdk-source/avs-device-sdk/MediaPlayer/test/MediaPlayerTest.cpp:286: Failure
Value of: m_stream->good()
Actual: false
Expected: true
/root/avs-sdk/sdk-source/avs-device-sdk/MediaPlayer/test/MediaPlayerTest.cpp:1149: Failure
Value of: m_playerObserver->waitForPlaybackStarted(sourceId)
Actual: false
Expected: true

I didn't change anything extra. I just followed the instructions from #1 to #12.

@kevinpei2001
Copy link
Author

As I mentioned I switched from x-window monitor to serial port and run the compilation and it worked but reported the errors.

@kevinpei2001
Copy link
Author

By the way, I am using ARTIK 710 which is a high-end gateway. Just FYI. Thanks a lot!

@bandkenamazoncom bandkenamazoncom changed the title AVS Compile issue. No rule to make target 'integration'. Stop. make test has failures Jan 25, 2018
@bandkenamazoncom
Copy link
Contributor

I don't understand why it compiles in one terminal but not in another one. We can leave that alone for now.

Let's change the title to the new problem too.

Can you show me your cmake line and the output when it is run?

@kevinpei2001
Copy link
Author

Hi, I used this line

cd /root/avs-sdk/sdk-build && cmake /root/avs-sdk/sdk-source/avs-device-sdk -DSENSORY_KEY_WORD_DETECTOR=OFF -DGSTREAMER_MEDIA_PLAYER=ON -DPORTAUDIO=ON -DPORTAUDIO_LIB_PATH=/root/avs-sdk/third-party/portaudio/lib/.libs/libportaudio.a -DPORTAUDIO_INCLUDE_DIR=/root/avs-sdk/third-party/portaudio/include

& log

Please see the attached log file which shows it is missing GTest and No keyword detector type specified etc.

Thanks!

log.txt

@bandkenamazoncom
Copy link
Contributor

There's not a whole lot to debug here. Can you rebuild with the DEBUG version? Add -DCMAKE_BUILD_TYPE=RELEASE to your cmake line.

Do you know which version of gstreamer you are using?

@kevinpei2001
Copy link
Author

Hi, Here is the command line I just run.

cd /root/avs-sdk/sdk-build && cmake /root/avs-sdk/sdk-source/avs-device-sdk -DCMAKE_BUILD_TYPE=RELEASE -DSENSORY_KEY_WORD_DETECTOR=OFF -DGSTREAMER_MEDIA_PLAYER=ON -DPORTAUDIO=ON -DPORTAUDIO_LIB_PATH=/root/avs-sdk/third-party/portaudio/lib/.libs/libportaudio.a -DPORTAUDIO_INCLUDE_DIR=/root/avs-sdk/third-party/portaudio/include >& log.txt

Attached is the log file.

I strictly followed the instruction at
https://github.com/alexa/avs-device-sdk/wiki/Ubuntu-Linux-Quick-Start-Guide

apt-get install -y openssl libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-libav pulseaudio doxygen libsqlite3-dev repo libasound2-dev

Gstreamer's version is 1.0

log.txt

@kevinpei2001
Copy link
Author

kevinpei2001 commented Jan 29, 2018

Hi, there, I did the following and the GTest missing issue is fixed.

sudo apt-get install cmake libgtest-dev
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make

copy or symlink libgtest.a and libgtest_main.a to /usr/lib folder
sudo cp *.a /usr/lib

However, the log still shows this issue:

Creating the build directory for the ACL with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.

Any ideas?
Thanks!!

@kevinpei2001
Copy link
Author

Here is the log:

-- Found GTest: /usr/lib/libgtest.a
Creating the build directory for the ACL with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the AuthDelegate with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the ADSL with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the AFML with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the CertifiedSender with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the ContextManager with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the MediaPlayer with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the PlaylistParser with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the CapabilityAgents with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the AIP with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the Alerts with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the AudioPlayer with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the Notifications with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the SpeakerManager with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the SpeechSynthesizer with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
Creating the build directory for the Integration with build type: RELEASE
No keyword detector type specified, skipping build of keyword detector.
-- Please fill /root/avs-sdk/sdk-build/Integration/AlexaClientSDKConfig.json beff
ore you execute integration tests.
Skipping build of NetworkIntegrationTests.cpp.

@frozenberg
Copy link
Contributor

Hi @kevinpei2001,

I think the correct flag to pass into your build was DCMAKE_BUILD_TYPE=DEBUG . Try that and post the resulting logs. Sorry for the confusion.

Fede

@kevinpei2001
Copy link
Author

Hi, Fede,

I changed the cmake line as the following. Please see the attached log.txt.
Thanks!
Kevin
log.txt

cd /root/avs-sdk/sdk-build && cmake /root/avs-sdk/sdk-source/avs-device-sdk -DCMAKE_BUILD_TYPE=DEBUG -DSENSORY_KEY_WORD_DETECTOR=OFF -DGSTREAMER_MEDIA_PLAYER=ON -DPORTAUDIO=ON -DPORTAUDIO_LIB_PATH=/root/avs-sdk/third-party/portaudio/lib/.libs/libportaudio.a -DPORTAUDIO_INCLUDE_DIR=/root/avs-sdk/third-party/portaudio/include >& log.txt

@frozenberg
Copy link
Contributor

Hi @kevinpei2001,

Now that you've successfully built with DEBUG mode, can you run the failing unit tests again and provide those logs?

Fede

@kevinpei2001
Copy link
Author

Hi, Fede,

I run the command make all test and get the attached log file.

Thanks.
Kevin
log_makealltest.txt

@frozenberg
Copy link
Contributor

@kevinpei2001,

Thanks for those logs. It looks like some tests are failing that are known to be flaky, so this may be a known issue (and probably pretty harmless).

Could you run ./MediaPlayer/test/MediaPlayerTest ${SRC_DIR}/MediaPlayer/inputs like before and post those logs? I'll be able to see the output from the individual tests.

Fede

@kevinpei2001
Copy link
Author

@frozenberg

Hi, Fede,

Here is the log.

[root@artik sdk-build]# ./MediaPlayer/test/MediaPlayerTest ${SRC_DIR}/MediaPlaye r/inputs
2018-01-30 21:43:02.141 [ 1] I sdkVersion: 1.4.0
[==========] Running 39 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 39 tests from MediaPlayerTest
[ RUN ] MediaPlayerTest.testStartPlayWaitForEnd
2018-01-30 21:43:02.683 [ 1] I MediaPlayer:noOutputConversion
2018-01-30 21:43:02.686 [ 2] 0 MediaPlayer:handleSetObserverCalled
2018-01-30 21:43:02.686 [ 2] 0 MediaPlayer:handleSetSourceCalled
2018-01-30 21:43:02.686 [ 2] E MediaPlayer:saveOffsetBeforeTeardown - gst_eleme nt_query_position failed
2018-01-30 21:43:02.719 [ 2] 0 MediaPlayer:handlePlayCalled:idPassed=1,currentI d=1
2018-01-30 21:43:02.720 [ 2] 0 MediaPlayer:handlePlay:attemptBuffering=0
2018-01-30 21:43:02.767 [ 2] 0 MediaPlayer:handlePlay:startingState=PLAYING,sta teReturn=ASYNC
/root/avs-sdk/sdk-source/avs-device-sdk/MediaPlayer/test/MediaPlayerTest.cpp:286 : Failure
Value of: m_stream->good()
Actual: false
Expected: true
/root/avs-sdk/sdk-source/avs-device-sdk/MediaPlayer/test/MediaPlayerTest.cpp:650: Failure
Value of: m_playerObserver->waitForPlaybackStarted(sourceId)
Actual: false
Expected: true

@frozenberg
Copy link
Contributor

Yep, these are known issues on certain platforms. This should be benign. Have you tried playing music or speech while running the SampleApp on your platform?

Fede

@kevinpei2001
Copy link
Author

I tried the following command from your instructions but it didn't work properly. That is is the reason I created this ticket. Alexa showed "Listening","Thinking" and then turned to "Idle". There is no voice or any result came back.

cd ~/sdk-folder/sdk-build/SampleApp/src
TZ=UTC ./SampleApp ~/sdk-folder/sdk-build/Integration/AlexaClientSDKConfig.json

@kevinpei2001
Copy link
Author

@frozenberg
SampleApp didn't play any music either. It was quiet. Just FYI.

@frozenberg
Copy link
Contributor

@kevinpei2001,

Oh ok. One issue we have been seeing with the SDK not playing back audio is the use of a specific gstreamer audio sink.

Can you try changing line 577 in MediaPlayer.cpp from

m_pipeline.audioSink = gst_element_factory_make("autoaudiosink", "audio_sink");

to

m_pipeline.audioSink = gst_element_factory_make("alsasink", "audio_sink");

?

Thanks
Fede

@kevinpei2001
Copy link
Author

@frozenberg

I changed that line and re-compiled it. I then run TZ=UTC make all integration
It gave the following errors:

[----------] 10 tests from AlexaCommunicationsLibraryTest (264264 ms total)

[----------] Global test environment tear-down
[==========] 10 tests from 1 test case ran. (264265 ms total)
[ PASSED ] 4 tests.
[ FAILED ] 6 tests, listed below:
[ FAILED ] AlexaCommunicationsLibraryTest.testSendEventWithAttachment
[ FAILED ] AlexaCommunicationsLibraryTest.testSendEventAndReceiveDirective
[ FAILED ] AlexaCommunicationsLibraryTest.testSendEventsSerially
[ FAILED ] AlexaCommunicationsLibraryTest.testSendEventsConcurrently
[ FAILED ] AlexaCommunicationsLibraryTest.testReceiveDirectiveOnDownchannel
[ FAILED ] AlexaCommunicationsLibraryTest.testPersistentConnection

6 FAILED TESTS
Integration/test/CMakeFiles/integration.dir/build.make:57: recipe for target 'Integration/test/CMakeFiles/integration' failed
make[3]: *** [Integration/test/CMakeFiles/integration] Error 1
CMakeFiles/Makefile2:6893: recipe for target 'Integration/test/CMakeFiles/integration.dir/all' failed
make[2]: *** [Integration/test/CMakeFiles/integration.dir/all] Error 2
CMakeFiles/Makefile2:6900: recipe for target 'Integration/test/CMakeFiles/integration.dir/rule' failed
make[1]: *** [Integration/test/CMakeFiles/integration.dir/rule] Error 2
Makefile:1850: recipe for target 'integration' failed
make: *** [integration] Error 2

@kevinpei2001
Copy link
Author

I run make all test and get more errors than before:

94% tests passed, 40 tests failed out of 704

Total Test time (real) = 97.40 sec

The following tests FAILED:
237 - SharedDataStreamTest.concurrencyNonblockableWriterDualReader (Failed)
383 - MediaPlayerTest.testStartPlayWaitForEnd (SEGFAULT)
384 - MediaPlayerTest.testStartPlayForUrl (SEGFAULT)
385 - MediaPlayerTest.testConsecutiveSetSource (SEGFAULT)
386 - MediaPlayerTest.testStartPlayWaitForEndStartPlayAgain (SEGFAULT)
387 - MediaPlayerTest.testStopPlay (SEGFAULT)
388 - MediaPlayerTest.testStartPlayCallAfterStopPlay (SEGFAULT)
389 - MediaPlayerTest.testStartPlayCallAfterStopPlayDifferentSource (SEGFAULT)
390 - MediaPlayerTest.testPauseDuringPlay (SEGFAULT)
391 - MediaPlayerTest.testResumeAfterPauseThenStop (SEGFAULT)
392 - MediaPlayerTest.testStopAfterPause (SEGFAULT)
393 - MediaPlayerTest.testPauseAfterPause (SEGFAULT)
394 - MediaPlayerTest.testResumeAfterPlay (SEGFAULT)
395 - MediaPlayerTest.testGetOffsetInMilliseconds (SEGFAULT)
396 - MediaPlayerTest.testGetOffsetInMillisecondsNullPipeline (SEGFAULT)
397 - MediaPlayerTest.testGetOffsetWhenStoppedFails (SEGFAULT)
398 - MediaPlayerTest.testGetOffsetWhenPaused (SEGFAULT)
399 - MediaPlayerTest.testPlayingTwoAttachments (SEGFAULT)
400 - MediaPlayerTest.testUnsteadyReads (SEGFAULT)
401 - MediaPlayerTest.testRecoveryFromPausedReads (SEGFAULT)
402 - MediaPlayerTest.testStartPlayWithUrlPlaylistWaitForEnd (SEGFAULT)
404 - MediaPlayerTest.testSetOffsetOutsideBounds (SEGFAULT)
406 - MediaPlayerTest.testRepeatAttachment (SEGFAULT)
407 - MediaPlayerTest.testSetVolumePlays (SEGFAULT)
408 - MediaPlayerTest.testAdjustVolumePlaysDuringPlay (SEGFAULT)
409 - MediaPlayerTest.testAdjustVolumePlays (SEGFAULT)
410 - MediaPlayerTest.testAdjustVolumeOutOfBounds (SEGFAULT)
411 - MediaPlayerTest.testSetMutePlays (SEGFAULT)
412 - MediaPlayerTest.testGetSpeakerSettings (SEGFAULT)
413 - MediaPlayerTest.testRoundingEdgeCase (SEGFAULT)
414 - MediaPlayerTest.testReadTags (SEGFAULT)
415 - MediaPlayerTest.testConsecutiveSameApiCalls (SEGFAULT)
416 - MediaPlayerTest.testImmediatePause (SEGFAULT)
417 - MediaPlayerTest.multiplePlayAndSetSource (SEGFAULT)
418 - MediaPlayerTest.invalidSourceId (SEGFAULT)
419 - MediaPlayerTest.doublePause (SEGFAULT)
420 - MediaPlayerTest.resumeWhenPlaying (SEGFAULT)
421 - MediaPlayerTest.resumeWhenStopped (SEGFAULT)
422 - MediaPlayerTest.newSetSourceLeadsToStoppedCallback (SEGFAULT)
423 - MediaPlayerTest.resumeAfterPauseWithPendingPlay (SEGFAULT)
Errors while running CTest
Makefile:127: recipe for target 'test' failed
make: *** [test] Error 8

@frozenberg
Copy link
Contributor

Ok, thank you for trying that. Were you able to run the SampleApp and check if any sound came out with that change?

More test failures are expected because our tests don't tolerate changing the gstreamer pipeline.

@kevinpei2001
Copy link
Author

@frozenberg

cd /root/avs-sdk/sdk-build/SampleApp/src
TZ=UTC ./SampleApp /root/avs-sdk/sdk-build/Integration/AlexaClientSDKConfig.json

The SampleApp doesn't work. I think it is because of the failure of the compilation as mentioned above.

2018-01-31 21:49:26.812 [ 1] I sdkVersion: 1.4.0

(SampleApp:11740): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(SampleApp:11740): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed

(SampleApp:11740): GLib-CRITICAL **: Source ID 119105344 was not found when attempting to remove it
Failed to create media player for speech!
Failed to initialize SampleApplication
Failed to create to SampleApplication!

@mradulan
Copy link
Contributor

mradulan commented Feb 7, 2018

what about 'echo $PATH'

@kevinpei2001
Copy link
Author

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

@mradulan
Copy link
Contributor

mradulan commented Feb 7, 2018

sudo ls /usr/local/lib/gst*

@kevinpei2001
Copy link
Author

ls: cannot access '/usr/local/lib/gst*': No such file or directory

@mradulan
Copy link
Contributor

mradulan commented Feb 7, 2018

did you run the ls command with sudo?

@mradulan
Copy link
Contributor

mradulan commented Feb 7, 2018

a good way would be cd /usr/local and the find . -name *gst*

@kevinpei2001
Copy link
Author

Please see the log attached.
log_gst.txt

@mradulan
Copy link
Contributor

mradulan commented Feb 7, 2018

  1. remove all the gstreamer files.
  2. After this run a gst-inspect-1.0 --version . It should not give any output.
  3. If the 1st two steps work as expected, install gstreamer 1.10.4 and other plugins such as gst-plugins-good, gst-plugins-bad, gst-plugins-base, gst-libav

@frozenberg
Copy link
Contributor

Hi again @kevinpei2001,

The service teams are still investigating, but I have another idea for a potential fix. In SpeechSynthesizer.cpp can you change this line in SpeechSynthesizer::executeOnDialogUXStateChanged

from

if (m_currentFocus != avsCommon::avs::FocusState::NONE)

to

if (m_currentFocus != avsCommon::avs::FocusState::NONE && m_currentState != SpeechSynthesizerObserverInterface::SpeechSynthesizerState::GAINING_FOCUS)

and let me know how that works out?

@kevinpei2001
Copy link
Author

@frozenberg Sure I will let you know. I am reinstalling gstreamer.

@alexa alexa deleted a comment from kevinpei2001 Feb 8, 2018
@mradulan
Copy link
Contributor

mradulan commented Feb 8, 2018

@kevinpei2001 , you should only delete the gstreamer plugins. Sorry for the command find . -name 'gst*' -exec rm -f {} \;

@kevinpei2001
Copy link
Author

@mradulan @frozenberg
The current gstreamer is this:
[root@artik src]# gst-inspect-1.0 --version
gst-inspect-1.0 version 1.8.3
GStreamer 1.8.3
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0

I changed the SpeechSynthesizer.cpp accordingly and re-compiled the application but the result is the same. Just "listing" "thinking" "idle" and no other response.
Please see the attached snapshot.
test

@frozenberg
Copy link
Contributor

Thanks for that snapshot. Could you again compile a DEBUG build like before and post debug logs?

Those are much more helpful for us. Thanks.

@frozenberg
Copy link
Contributor

Another thing that would be interesting to try is simply increasing the timeout. Not sure if you've tried this already.

In DialogUXStateAggregator.h you can change line 51 to

DialogUXStateAggregator(std::chrono::milliseconds timeoutForThinkingToIdle = std::chrono::seconds{20}); or whatever timeout seems appropriate. Setting it very high and seeing if you still fail to receive the correct directives would help shine some light on the issue.

Fede

@kevinpei2001
Copy link
Author

@frozenberg Hi, I changed the timeout to 20 seconds. Still mute although I saw it took more time "thinking". Please see the log file attached.
log.txt

@celinval
Copy link
Contributor

celinval commented Feb 13, 2018

Hi @kevinpei2001 ,

Can you please try to update your gstreamer? GStreamer 1.8 did not work with the SDK in my ubuntu laptop. We recommend GStreamer 1.10.4 or later [1].

Make sure you update your PATH and LD_LIBRARY_PATH to ensure that you are using the correct GStreamer.

Thanks

@kevinpei2001
Copy link
Author

@celinval Hi, yes I can. Actually as I mentioned I tried 1.10.4 but AVS still didn't work. Maybe I did somethin wrong. Gstreamer installation is kind of tricky.
Please kindly provide an instruction of how to upgrade 1.8 to 1.10.4 including where I get a reliable installation package and how to upgrade it and meet your requirements?

@kevinpei2001
Copy link
Author

The previous engineer gave me some instructions but it didn't work.

@frozenberg
Copy link
Contributor

Hi @kevinpei2001,

An update from the service teams: it seems as if your device is attempting to stream additional data after receiving a StopCapture directive, which it should not be doing. I've been trying to reproduce this and have been unsuccessful, but I have some logs that may help prove whether or not this is the case.

In HTTP2Stream.cpp, could you add the following:

ACSDK_INFO(LX("readCallback").m("readInProgress")); on line 380, right before the break;
ACSDK_INFO(LX("readCallback").m("readCompleted")); on line 385, right before return 0;.

In AudioInputProcessor.cpp:

ACSDK_INFO(LX("stopCapture").d("numUnreadBytes", m_reader->getNumUnreadBytes())); on line 619, right before if (stopImmediately) {

Thanks. Also, just double-checking, you haven't edited any part of the codebase, right?

Fede

@celinval
Copy link
Contributor

Hi @kevinpei2001,

You can build later GStreamer versions from source. You can find instructions on how to build each package here. Make sure you build all the following packages:

  • GStreamer 1.10.4
  • GStreamer Base Plugins
  • GStreamer Good Plugins
  • GStreamer Libav Plugin
  • GStreamer Ugly Plugins

After you installed GStreamer, run gst-inspect-1.0 --version to make sure it is going to the correct version.

You can also use "whereis " to find out where the lib files are. E.g.:

> whereis libgstreamer-1.0.so
libgstreamer-1.0: /usr/local/lib/libgstreamer-1.0.la /usr/local/lib/libgstreamer-1.0.so

After that, you can run "ls -l " to know if it is pointing to the correct version. E.g.:

ls -l /usr/local/lib/libgstreamer-1.0.so
lrwxrwxrwx .. .... ...  /usr/local/lib/libgstreamer-1.0.so -> libgstreamer-1.0.so.0.1004.0

@kevinpei2001
Copy link
Author

@frozenberg @celinval Thanks. I will have to set up another board and try them. I will let you know the outcome.

@kevinpei2001
Copy link
Author

@celinval Hi, I re-flashed the board and installed the gstreamer 1.10.4 as you instructed.

Compiled and installed the following:

GStreamer 1.10.4
GStreamer Base Plugins
GStreamer Good Plugins
GStreamer Libav Plugin
GStreamer Ugly Plugins

However, when I run gst-inspect-1.0 --version it still gave me 1.8.3 version which I never installed.

[root@artik ~]# gst-inspect-1.0 --version
gst-inspect-1.0 version 1.10.4
GStreamer 1.8.3
Unknown package origin

Any suggestions?

gst2

@kevinpei2001
Copy link
Author

I re-flashed the board and installed GStreamer 1.10.4 and followed the instructions and reached step #12. I executed:
TZ=UTC make all integration
Please see the log attached. It seems there are quite a few issues created.

Thanks.
log_integration.txt

@kevinpei2001
Copy link
Author

@frozenberg

@celinval
Copy link
Contributor

Hi @kevinpei2001,

Can you run:

gst-inspect-1.0 audiotestsrc

This will give the plugin details including their location.

@scotthea-amazon
Copy link
Contributor

Hi @kevinpei2001,

I am closing issue due to inactivity. Feel free to re-open if you run into issues around this again or there are further comments.

Thank you,
-SWH

@AntonKasabutskiSamsung
Copy link

AntonKasabutskiSamsung commented Mar 14, 2018

I'd like to leave a comment:
@kevinpei2001 , @scotthea-amazon , @celinval
I made it working with ARTIK 530 using this thread.
There are several changes has to be applied for ARTIK.

  1. Curl should be removed completely (also using rm /usr/lib/arm-linux-gnueabihf/libcurl*) from ARTIK right before make install inside of custom built curl library (as mentioned in official Alexa instructions).
  2. You have to build portaudio example (paex_record.c) to test audio recording. What I've done here:
  • Changed file itself (line 56: #define WRITE_TO_FILE (1) and line 59: #if 0)
  • Changed alsa.conf in /usr/share/alsa/:
pcm.default cards.pcm.default
pcm.sysdefault cards.pcm.default
pcm.front cards.pcm.default
etc..

Built application with paex_record.c will point You what lines should be changed to default in alsa.conf.
Then try to play recorded file using aplay.
3. You must install GStreamer 1.10.4 with all plugins. Result should be:

gst-inspect-1.0 version 1.10.4
GStreamer 1.10.4
Unknown package origin

How to get GStreamer 1.10.4 and not 1.8.3?
apt-get remove "*gst*"
Also try to find something like gstream using: find / -name "*gst*"
Also check next folder for any gstream libs: /usr/lib/arm-linux-gnueabihf

Everything else should be just like instructions says. Applying those changes make all test showed only 1 failure: 690 - NotificationsCapabilityAgentTest.testClearData (Failed). But SampleApp works smooth. Will do more tests later but it was big step forward.

Thanks everybody for your comments and suggestions here.

@scotthea-amazon
Copy link
Contributor

Hi AntonKasabutskiSamsung,

Thank you for the thorough follow-up notes!

-SWH

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

8 participants