I've noticed that if I call 'stop', the listener then receives the 'done' status, however I can receive text via the speech.listen callback after the 'done' event arrives.
So how do I correctly determine when all text has arrived?
I was expecting that 'done' would not be sent until all text has been converted and delivered. In this way I would know when I can stop listening for recognize text. As it stands I don't have anyway of knowing that all text has arrived.
BTW: I really don't like how the status comes as a String. This is very error prone when trying to match a status. A enum for the status would be much nicer.
I've noticed that if I call 'stop', the listener then receives the 'done' status, however I can receive text via the speech.listen callback after the 'done' event arrives.
So how do I correctly determine when all text has arrived?
I was expecting that 'done' would not be sent until all text has been converted and delivered. In this way I would know when I can stop listening for recognize text. As it stands I don't have anyway of knowing that all text has arrived.
BTW: I really don't like how the status comes as a String. This is very error prone when trying to match a status. A enum for the status would be much nicer.