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

AudioPlayer status change during user interaction #139

Closed
3 of 10 tasks
zhaokai3000 opened this issue Aug 22, 2022 · 3 comments
Closed
3 of 10 tasks

AudioPlayer status change during user interaction #139

zhaokai3000 opened this issue Aug 22, 2022 · 3 comments

Comments

@zhaokai3000
Copy link

zhaokai3000 commented Aug 22, 2022

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

Briefly summarize your issue:

When the device is playing music or flash briefings, if user try to interact with alexa, for example set a reminder, the status of audio player which plays the music or flash briefings change shortly between the interaction. On some device, the status change may cause music or news being played shortly between the interaction.

What is the expected behavior?

Music and flash briefings shouldn't be played during user interaction.

What behavior are you observing?

Music and flash briefings being played shortly between user interaction.

Provide the steps to reproduce the issue, if applicable:

  1. start music or flash briefings;
  2. set a reminder and follow the hints.

Tell us about your environment:

What version of the AVS Device SDK are you using?

  <x.y.z>

2.9.2

Tell us what hardware you're using:

  • Desktop / Laptop
  • Raspberry Pi
  • Other - tell us more: arm board running linux

Tell us about your OS (Type & version):

  • Linux

  • MacOS

  • Raspbian Stretch

  • Raspbian Jessy

  • Other - tell us more:

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

  • The issue is not applicable to the AVS Device SDK SampleApp.
  • The issue is not reproducible on the AVS Device SDK SampleApp.

log for alexa smart screen sdk running on a ubuntu machine:
log.txt
As you can see in the log, the audio player status changes shortly from paused to playing and back to paused between the user interaction.
2022-08-22 02:08:41.892 [ 4] 0 AudioPlayer:changeState:fromState=PAUSED,toState=PLAYING
......
2022-08-22 02:08:41.902 [ 4] 0 AudioPlayer:changeState:fromState=PLAYING,toState=PAUSED

On the ubuntu machine, the time maybe around 10 milliseconds, but on my arm device, the time sometimes could be more than 100 milliseconds.
https://user-images.githubusercontent.com/16895712/185832438-a3f92dc8-4ae2-41df-abdd-85f05280a5df.mp4

@dtpancha
Copy link
Contributor

Hi @zhaokai3000, we believe that this is the expected behavior. In the time between the interaction, the AudioPlayer will regain focus as AFML is unable to determine that a new directive will be sent from Alexa in the interim. This gap is likely to be very small on a more powerful device, but larger on a less powerful one. We will close this issue if you have no further questions.

@zhaokai3000
Copy link
Author

Hi @zhaokai3000, we believe that this is the expected behavior. In the time between the interaction, the AudioPlayer will regain focus as AFML is unable to determine that a new directive will be sent from Alexa in the interim. This gap is likely to be very small on a more powerful device, but larger on a less powerful one. We will close this issue if you have no further questions.

Well, I could understand this, but the user experience is not so good and our tester think this is intruding sounds between interaction and should not happen.

@VaruPan
Copy link
Contributor

VaruPan commented Sep 7, 2022

Thanks a lot for reaching out. We acknowledge this as a design challenge with asynchronous management of audio and visual directives. As long as ducking is enabled, local player will continue playing media unless told by Alexa otherwise.

You can disable this feature by toggling the following flag https://developer.amazon.com/en-US/docs/alexa/avs-device-sdk/cmake-parameters.html#audio

For more information on Interaction model, please follow the this link - https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/interaction-model.html#foreground-vs-background-channels

@VaruPan VaruPan closed this as completed Sep 7, 2022
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

3 participants