Android Question Is There Any Way to REALLY Detect when Text-To-Speech is Finished Speaking?

Shadow&Max

Active Member
Licensed User
Longtime User
I've been playing with this for months, searched many times, and have never found a really good solution.

If I use:
B4X:
Dim ph as Phone

Sub ph_TextToSpeechFinish (IntentAsIntent)
    Do Something Here
End Sub

it NEVER FIRES when the text is ACTUALLY finished speaking. Of course, the duration of the speech could be shorter or longer based upon the speed set, but that event fires WAY before the text is actually finished.

Is there a TRUE way to know it's really done TALKING?

If I 'speak:' "The Lazy Brown Dog...," I need to do something when it's over. But if the text is "The lazy brown dog jumped over the split rail fence in the back of the woods right by the cedar tree, but near the stone wall built by the pilgrims," the event fires somewhere after the lazy dog jumped. But I can't do what I need to do until the entire sentence is completely finished.
 
Last edited:

lemonisdead

Well-Known Member
Licensed User
Longtime User
Last edited:
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
lemonisdead:

Worked perfectly... Thanks so much for the link... Thank you Erel for making this happen.

lemon... gotta ask you something... I searched over and over for this solution. Can you tell me what search term you used, what OS you're using, and what browser? I'm wondering if different browsers yield different results???
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
I'm glad it works for you too.
There is no magic or any problem : it was in my previously taken notes :)
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
Oh! Thanks! Jeez, I searched for that forever! Thank you so much again.

I actually spent a week writing a workaround for one part of my app, which works, but it was like alchemy. I had to do this in another part of the app in a place far less complex, and it should have been so easy, but my original alchemy DIDN'T work in the simple one!

Much appreciated!
 
Upvote 0
Top