Linga Venkatesh
Linga Venkatesh

Reputation: 9

Text to speech Speak api is interrupted when talkback is announcing

Context:

I am working on Immersive reading of text where user can manipulate reading by clicking forward, rewind, play pause buttons. For reading text, I am using Google Text to speech engine meanwhile reading we need to highlight words which it is currently reading.

Problem: [Accessibility Mode] While reading is in progress, if user had done any swipe or tapped on any control, reading is stopped and contentDescription is being read. When checked on onStop() callback it says utterance is interrupted.

Is there a callback to know whether android is done announcement of contentDescription? I can use that and resume playing/reading text.

Thanks in advance.

Regards, Venkatesh.

Upvotes: 0

Views: 481

Answers (1)

Phil Weaver
Phil Weaver

Reputation: 758

There's no way you can get this information from TalkBack, but you may be able to infer it from the TTS api. I suspect the progress listener at least can help you know where you were when you got interrupted.

Upvotes: 1

Related Questions