Skip to content

awstranscriber: make use of new result stability AWS API option

https://aws.amazon.com/blogs/machine-learning/amazon-transcribe-now-supports-partial-results-stabilization-for-streaming-audio/

Amazon seem to have realized the previous iteration of their API made it difficult to identify items from one result to the next, which made the element much more complicated than it should have been. With that new "stability" option, we can enqueue items as soon as they stabilize, and simply rely on the current index in the transcript to output them exactly once.

This also means the "use_partial_results" is now useless, as there will be no difference in accuracy between a non-partial result and and of its stable items that might have been pushed from previous partial versions of the result.

The property is removed, instead a new option is exposed to let users control how fast results should stabilize.

This greatly simplifies the code, and also improves the output as punctuation doesn't need to be randomly discarded anymore.

Merge request reports