How to do a subtitle in InDesign ebook

I am making an eBook with pronunciation. It contains two words and a button. When press the button, the two words will be pronounced. When the first word is pronounced, a triangle will appear under the first word. When the second word is pronounced, a triangle will appear under the second word.
How can I do it in InDesign? Which function of action it belongs so that the triangle and the pronunciation are synchronized?

Thank you for your help.

You might be up against it - depends what you mean by eBook.
Is it an ePub or an interactive PDF?

Either way - there’s so many e-readers and so many PDF readers they may not conform to all the ways it might be possible.

Can you share more details how it will be published - as that way we can give better guidance?

Thank you for your reply.

it is ePub.
I just share people the epub file so that they can read it on iBook in iphone / ipad. OR adobe digital Edition in android.

I do not know how to publish and where to publish the ePub so people’s device can be compatible to the epub file.

You can’t - that’s the issue with interactive elements - as some e-readers won’t be able to understand what it is.

It’s likely you will need to set the animation to the length of the sound clip manually.
When you press play - the pronunciation begins.
Play button could trigger animation
But the timing would need to be manual.

There’s no way - I know of - that will automatically time the animation based on the length of the clip.

Play = appearance of triangle - for length of time
First triangle disappear after x seconds
The second triangle appears
The second triangle disappears after x seconds.

Thank you for your advice.
Now I know how to do it manually. :smiley: