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

Can not decode the token information from speak directive #392

Closed
8 tasks
BobXLiu opened this issue Dec 14, 2017 · 2 comments
Closed
8 tasks

Can not decode the token information from speak directive #392

BobXLiu opened this issue Dec 14, 2017 · 2 comments

Comments

@BobXLiu
Copy link

BobXLiu commented Dec 14, 2017

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

Briefly summarize your issue:

After asked "Alexa, what't my sports update?" , sometimes i can only heard "here is yours sports update", but can not heard sports update content. So i checked the log information and found can not decode the token information from speak directive while send SpeechStarted event to AVS

What is the expected behavior?

What behavior are you observing?

I checked the log information and found the token information is empty while send "SpeechStarted" event to AVS

2017-12-14 05:08:01.245 [ 86] 0 HTTP2Stream:receivedRequestId:value=x-amzn-requestid: 064242fffe644916-00003a8f-00030696-01e138a479703f74-27cf2d5e-11

2017-12-14 05:08:06.972 [ 6] 0 ContextManager:updateStateLocked:action=updatedState,state={"token":"","offsetInMilliseconds":12,"playerActivity":"PLAYING"},namespace=SpeechSynthesizer,name=SpeechState
2017-12-14 05:08:06.973 [ 6] 0 EventBuilder:buildJsonEventString:messageId=46236802-97d5-4e3a-b235-2fbd29bf4679,namespace=SpeechSynthesizer,name=SpeechStarted
AVSConnectionManager::sendMessage {"event":{"header":{"namespace":"SpeechSynthesizer","name":"SpeechStarted","messageId":"46236802-97d5-4e3a-b235-2fbd29bf4679"},"payload":{"token":""}}}
TestSpeechSynthesizerObserver::onStateChanged currentSpeechSynthesizerState: 1, newState = 0

The correct behavior should be this:

2017-12-14 05:10:30.598 [ 6] 0 ContextManager:updateStateLocked:action=updatedState,state={"token":"amzn1.as-ct.v1.Domain:Application:Sports#ACRI#PlatformTTSRenderer_a8f660fd-21b8-4d34-94e2-ced4ca7e0dfb","offsetInMilliseconds":14,"playerActivity":"PLAYING"},namespace=SpeechSynthesizer,name=SpeechState
2017-12-14 05:10:30.599 [ 6] 0 EventBuilder:buildJsonEventString:messageId=de82aad3-fd9c-4cad-8972-83ce1848d3a9,namespace=SpeechSynthesizer,name=SpeechStarted
AVSConnectionManager::sendMessage {"event":{"header":{"namespace":"SpeechSynthesizer","name":"SpeechStarted","messageId":"de82aad3-fd9c-4cad-8972-83ce1848d3a9"},"payload":{"token":"amzn1.as-ct.v1.Domain:Application:Sports#ACRI#PlatformTTSRenderer_a8f660fd-21b8-4d34-94e2-ced4ca7e0dfb"}}}

Provide the steps to reproduce the issue, if applicable:

Tell us about your environment:

What version of the AVS Device SDK are you using?

  <x.y.z>

Tell us what hardware you're using:

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

Tell us about your OS (Type & version):

  • Linux
  • MacOS
  • Raspbian Stretch
  • Raspbian Jessy
  • Other - tell us more:
@scotthea-amazon
Copy link
Contributor

Hello BobXLiu,

Thank you very much for bringing this to our attention!

Note that in the logs you provided we can see a properly formed token arriving (below), so this definitely appears to be a client side issue:

2017-12-14 05:08:01.507 [ e] I DirectiveSequencer:onDirective:UnparsedDirective={"directive"\:{"header"\:{"namespace"\:"SpeechSynthesizer"\,"name"\:"Speak"\,"messageId"\:"4b7a0709-f638-46f7-a80f-b17a6e48fcfb"\,"dialogRequestId"\:"7fac1a8a-a8bd-4f3c-b055-bec4c851bd11"}\,"payload"\:{"url"\:"cid\:PlatformTTSRenderer_b8016e80-6ad8-445c-b535-c1f13e88ccf9_11639124"\,"format"\:"AUDIO_MPEG"\,"token"\:"amzn1.as-ct.v1.Domain\:Application\:Sports#ACRI#PlatformTTSRenderer_b8016e80-6ad8-445c-b535-c1f13e88ccf9"}}}

Can you please tell us what version of the SDK you are using?

Thank you,
-SWH

@BobXLiu
Copy link
Author

BobXLiu commented Dec 15, 2017

Hi @scotthea-amazon,

SDK version: v1.1.0

I checked the log information again and found the SpeechSynthesizer:onFocusChangeFailed caused by cancel audioplayer directive, so can not heard sports update content. If i updated the "STATE_CHANGE_TIMEOUT" parameter from 2 to 5, it will be OK.
I checked the AVS SDK v1.3.0 source code and found the "STATE_CHANGE_TIMEOUT" parameter value is 5.

@BobXLiu BobXLiu closed this as completed Dec 15, 2017
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

2 participants