Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current actions - continuous / sequence #440

Open
mtrakal opened this issue Oct 16, 2024 · 1 comment
Open

Current actions - continuous / sequence #440

mtrakal opened this issue Oct 16, 2024 · 1 comment

Comments

@mtrakal
Copy link

mtrakal commented Oct 16, 2024

It would be nice, when TTS / audio actions can play in a sequence.

For example, when you add 2 or more actions from:

  • Speak label
  • Speak custom text
  • Play recorded audio

It will play / say only last one.
Last one in drop down menu maybe? If I put 3 actions: Speak label, Play recorded audio and Speak custom text. Only Play recorded audio is started.

image

On the screen I want to:

  1. say animal name
  2. play his sound

But the app plays only sound without saying label (animal name).

Expected behavior:

  • play / say first action in list
  • play / say second action in list
  • etc

Undertand, that it's primarily to make more actions together and not in sequence. But it would be nice improvement, when actions which need to play sound could be in sequence.


Add ordering for this actions would be nice benefit for that cases.

@fevisera
Copy link

Hi,

I’m not very familiar with this repository, so apologies if I have missed any context or conventions.

Upon reviewing the code, it seems that the following section prevents the playback of grid text and custom audio:

let hasAudioAction = actions.some((a) => a.modelName === GridActionAudio.getModelName() && a.dataBase64);
if (hasAudioAction) {
    actions = actions.filter(
        (a) =>
            a.modelName !== GridActionSpeak.getModelName() && a.modelName !== GridActionSpeakCustom.getModelName()
    );
}

Relevant Code Link

That implementation was intentionally added some time ago, possibly due to this discussion and comment.

I think adding more functionality to audio playback could be beneficial, as previously commented. This might be achievable with minimal complexity by managing promises to execute sequentially. I would be happy to try implementing this if the repository maintainers are interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants