Open mtrakal opened 1 week ago
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()
);
}
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.
It would be nice, when TTS / audio actions can play in a sequence.
For example, when you add 2 or more actions from:
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.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:
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.