alexa / alexa-smart-screen-sdk

⛔️ DEPRECATED Active at https://github.com/alexa/avs-device-sdk
Apache License 2.0
76 stars 26 forks source link

No "SPEAKING" status for the joke skill #129

Closed zhaokai3000 closed 2 years ago

zhaokai3000 commented 2 years ago

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

Briefly summarize your issue:

When I'm asking alexa to "tell me a joke", the alexa state change directly from thinking to idle. Some seconds later, alexa tells me a joke but in a very low volume. Response to other questions like "tell me the weather", "tell me a story" sounds just ok.

What is the expected behavior?

The state and volume of response to "tell me a joke" skill should be same as other skills.

What behavior are you observing?

No speaking state and volume is very low for "tell me a joke" skill. Sometimes even no response to this command.

Provide the steps to reproduce the issue, if applicable:

Call Alexa: "Alexa, tell me a joke"

Tell us about your environment:

What version of the AVS Device SDK are you using?

1.26.0

Tell us what hardware you're using:

Tell us about your OS (Type & version):

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

no speaking status for joke skill.txt

vkarpuram commented 2 years ago

Hi @zhaokai3000, I have not been able to reproduce this issue. Could you please share the smart screen sdk configuration json?

zhaokai3000 commented 2 years ago

{ "sampleApp": { "websocketInterface":"127.0.0.1", "websocketPort":8933, "websocketCertificateAuthority":"/etc/avs/certs/ca.cert", "websocketCertificate":"/etc/avs/certs/server.chain", "websocketPrivateKey":"/etc/avs/certs/server.key" }, "alexaPresentationCapabilityAgent": { // The minimum state reporting interval in milliseconds for the AlexaPresentation CA // "minStateReportIntervalMs": 600 // The interval between checks for context changes // "stateReportCheckIntervalMs": 2000 }, "gui": { "appConfig": { "description": "Smart Screen Sample UI", "mode": "HUB", "emulateDisplayDimensions": true, "scaleToFill": true, "audioInputInitiator": "WAKEWORD", "windows": [ { "id": "smartScreenLandscape", "templateId": "smartScreenLandscape", "sizeConfigurationId": "fullscreen", "interactionMode": "smart_screen", "supportedExtensions": [ "aplext:backstack:10", "aplext:e2eencryption:10" ] } ], "defaultWindowId": "smartScreenLandscape", "deviceKeys": { "talkKey": { "code": "KeyA", "keyCode": 65, "key": "a" }, "backKey": { "code": "KeyB", "keyCode": 66, "key": "b" }, "exitKey": { "code": "Escape", "keyCode": 27, "key": "Escape" }, "toggleCaptionsKey": { "code": "KeyC", "keyCode": 67, "key": "c" }, "toggleDoNotDisturbKey": { "code": "KeyD", "keyCode": 68, "key": "d" } } }, "visualCharacteristics": [ { "type": "AlexaInterface", "interface": "Alexa.InteractionMode", "version": "1.1", "configurations": { "interactionModes": [ { "id": "smart_screen", "uiMode": "HUB", "interactionDistance": { "unit": "INCHES", "value": 130 }, "touch": "SUPPORTED", "keyboard": "SUPPORTED", "video": "SUPPORTED", "dialog": "SUPPORTED" } ] } }, { "type": "AlexaInterface", "interface": "Alexa.Presentation.APL.Video", "version": "1.0", "configurations": { "video": { "codecs": [ "H_264_42", "H_264_41" ] } } }, { "type": "AlexaInterface", "interface": "Alexa.Display.Window", "version": "1.0", "configurations": { "templates": [ { "id": "smartScreenLandscape", "type": "STANDARD", "configuration": { "sizes": [ { "type": "DISCRETE", "id": "fullscreen", "value": { "unit": "PIXEL", "value": { "width": 1280, "height": 800 } } } ], "interactionModes": [ "smart_screen" ] } } ] } }, { "type": "AlexaInterface", "interface": "Alexa.Display", "version": "1.0", "configurations": { "display": { "type": "PIXEL", "touch": [ "SINGLE" ], "shape": "RECTANGLE", "dimensions": { "resolution": { "unit": "PIXEL", "value": { "width": 1280, "height": 800 } }, "physicalSize": { "unit": "INCHES", "value": { "width": 8.6, "height": 5.4 } }, "pixelDensity": { "unit": "DPI", "value": 160 }, "densityIndependentResolution": { "unit": "DP", "value": { "width": 1280, "height": 800 } } } } } } ] } }

zhaokai3000 commented 2 years ago

I tried running the smart screen sample app on a ubuntu machine with the same smart screen config, also no "speaking" status is displayed in the log, the alexa state changed directly from "thinking" to "idle". But the volume sounds the same as other responses.

1cengizk commented 2 years ago

@zhaokai3000 I have used the smart screen sdk configuration json you provided and I am able to see the joke in the SampleApp with no issue in the volume level.

It is happening with an APL render document directive coming down to the SDK though; not with the Speak directive. Attention state change to SPEAKING only happens when the Speak directive comes down to the device.

So, what is happening here most likely is the browser you are using on those Linux hosts do not support playing audio through APL. APL officially supports Chrome browser only; so your mileage might vary with any other browser.

Please check the following link for browser requirements: https://developer.amazon.com/en-US/docs/alexa/alexa-smart-screen-sdk/ubuntu.html#browser-requirements

aravnata commented 2 years ago

Closing due to inactivity. Please reopen if needed.

lzy831 commented 2 years ago

I'am checking this issue with @zhaokai3000

Our browser is chrome, it can support the APL render document directive. But only when the smart screen page (a tab object in chrome) is in showing state, the APL render document directive can be executed normal(both the UI and audio)

Now the issue is, If the smart screen is hiden, the audio resource in the APL render document can not be playback with chrome's WebAudio API. I find the playWithContext() function which locate in main.bundle.js will not be invoked.

anybody can help me to confirm that? Is there any constraints, for a Alexa screen device, the smart screen page (tab) must in showing state, then it can execute the APL render document directive.

zhaokai3000 commented 2 years ago

Seems I don't have the right to reopen this issue again.. Could someone please reopen it? @powj @1cengizk

lzy831 commented 2 years ago

I have checked the main.bunlde.js When Alexa replies for "joke" request, the audio playback is driven by the smart screen's animation. but when smart screen tab is in background state, the tab's animotion schedule will not be launched.