2020-11-25 22:16

Latency is more than one second while Alexa is responding

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

Briefly summarize your issue:

When we are communicating with Alexa, its response is very slow, i.e., it is taking more than one second for some commands and for some commands it is responding with in a second. TIme stamp verified using system time please look at the logcat : case 1: 07-12 19:31:20.358 2612 3742 D AlexaExe_SHELL: # Listening... # 07-12 19:31:24.243 2612 3742 D AlexaExe_SHELL: # Thinking... # 07-12 19:31:51.950 2612 3742 D AlexaExe_SHELL: # Speaking... #

It is taking approximtely 27 seconds in one case.

case 2: 07-16 12:00:59.608 2600 3950 D AlexaExe_SHELL: # Listening... # 07-16 12:01:02.213 2600 3950 D AlexaExe_SHELL: # Thinking... # 07-16 12:01:02.771 2600 3950 D AlexaExe_SHELL: # Speaking... # case 3 : 07-12 14:29:31.073 2596 3645 D AlexaExe_SHELL: # Listening... # 07-12 14:29:33.802 2596 3645 D AlexaExe_SHELL: # Thinking... # 07-12 14:29:34.312 2596 3645 D AlexaExe_SHELL: # Speaking... # In some cases it is taking less than one second and in some cases it is taking more than one second

What is the expected behavior?

Alexa should give response with in a second

What behavior are you observing?

It is taking more than one minute.

Provide the steps to reproduce the issue, if applicable:

Ask any command and check how much time it is taking to respond.

Tell us about your environment:

What version of the AVS Device SDK are you using?


Tell us what hardware you're using:

  • [ ] Desktop / Laptop
  • [ ] Raspberry Pi
  • [ ] Other - tell us more: Ubunut

Tell us about your OS (Type & version):

  • [ ] Linux
  • [ ] MacOS
  • [ ] Raspbian Stretch
  • [ ] Raspbian Jessy
  • [ ] Other - tell us more:


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • weixin_39782355 weixin_39782355 5月前

    Hi there, sorry for our late response on this. Are you still having problems?

    点赞 评论 复制链接分享
  • weixin_39980129 weixin_39980129 5月前

    I am closing this issue due to inactivity. Please feel free to re-open it if it has been closed in error.

    点赞 评论 复制链接分享
  • weixin_39721924 weixin_39721924 5月前

    Hi thanks for posting,

    This could be due to a network latency. For reference can you try ping avs-alexa-fe.amazon.com

    My machine as latency of ping avs-alexa-fe.amazon.com
    PING latinum-us-west-2.amazon.com ( 56 data bytes 64 bytes from icmp_seq=0 ttl=235 time=43.502 ms 64 bytes from icmp_seq=1 ttl=235 time=44.896 ms 64 bytes from icmp_seq=2 ttl=235 time=44.886 ms

    点赞 评论 复制链接分享
  • weixin_39697096 weixin_39697096 5月前

    Hi thanks for your response, Here is the latency of my machine after ping avs-alexa-fe.amazon.com PING latinum-us-west-2.amazon.com ( 56(84) bytes of data. 64 bytes from icmp_seq=1 ttl=226 time=280 ms 64 bytes from icmp_seq=2 ttl=226 time=278 ms 64 bytes from icmp_seq=3 ttl=226 time=278 ms 64 bytes from icmp_seq=4 ttl=226 time=278 ms 64 bytes from icmp_seq=5 ttl=226 time=278 ms 64 bytes from icmp_seq=6 ttl=226 time=278 ms 64 bytes from icmp_seq=7 ttl=226 time=278 ms

    点赞 评论 复制链接分享
  • weixin_39913105 weixin_39913105 5月前

    Hi , I'm assuming you are running your tests on Android. Can you please tell us which device / emulator you are using as well as which Android version?

    It would also be great if you could provide us more logs so we can try to identify which operation is taking so long.


    点赞 评论 复制链接分享
  • weixin_39697096 weixin_39697096 5月前

    We are using an Android Device running Android-Pie (9) OS on it. From logs timestamp of Alexa states Thinking to Speaking, we can see that there is ~500 to 600 milliseconds of gap. But in manual stopwatch check, we are able to see various time gaps between these two states like 2 seconds, 3 seconds and sometimes 6 seconds.

    I am attaching the Android Logs here for reference. Please search for word alexa. We will capture the AVS SDK logs again and share them shortly. Latency_v1.14_withLED.txt log_time.txt

    点赞 评论 复制链接分享
  • weixin_39697096 weixin_39697096 5月前

    Hi , We are not getting the AVS SDK logs from v1.14. We have enabled DEBUG9 flag in startSample.sh file, but there are only pretty print lines of states Listening, Thinking and Speaking. No other logs from the code are captured in the file. We were able to take logs for v1.12 earlier with the same flag DEBUG9. Is there any other way to capture the logs in v1.14??

    点赞 评论 复制链接分享
  • weixin_39806779 weixin_39806779 5月前

    Hi ,

    DEBUG0 through DEBUG9 logs are disabled in non-DEBUG builds. Are you testing with a DEBUG build?

    Best Regards, -SWH

    点赞 评论 复制链接分享
  • weixin_39697096 weixin_39697096 5月前

    Hi -amazon As per my knowledge, the CMAKE flag is assigned value as DEBUG in android.sh From where else, I need to set the build type as DEBUG?

    点赞 评论 复制链接分享
  • weixin_39980129 weixin_39980129 5月前

    Hi , you can change the build type by changing BUILD_TYPE in androidConfig.txt file. Please refer to the below link for more information.


    点赞 评论 复制链接分享
  • weixin_39697096 weixin_39697096 5月前

    Thanks for the info !!

    Hi -amazon I was able to collect the AVS SDK logs. Attaching them here : We asked two commands 1) What is the time? 2) Where is Mumbai

    We saw latency of 2+ seconds. AVS_SDK_Logs_for_WhatIsMumbaiCommand_Latency.txt AVS_SDK_Logs_for_WhatIsTheTimeCommand_Latency.txt

    Please provide your analysis.

    Thanks & Regards, Dipali

    点赞 评论 复制链接分享
  • weixin_39697096 weixin_39697096 5月前

    Hi -amazon , , Can you please provide your analysis on above logs? Are they sufficient, and contain required logs for debugging? One info from our side : We see 1+ seconds latency on Echo spot device too, for almost all commands. As mentioned earlier, we are using stopwatch to check the latency. We start stop-watch timer on the end of utterance of command and stop the timer on the start of response by Alexa.

    Is there any other way to verify latency between Alexa States Thinking to Speaking, through logs?

    点赞 评论 复制链接分享
  • weixin_39697096 weixin_39697096 5月前

    Hi -amazon , , Can you provide your analysis on this issue? Please refer attached logs. We are stuck at this issue.

    点赞 评论 复制链接分享