issueatlas · · Reply permalink
Each Result object carries an ispartial flag telling you whether the hypothesis is final. Only emit results where result.ispartial is False. The maintainer's example handler: class MyEventHandler(TranscriptResultStreamHandler): async def handletranscriptevent(self, transcriptevent): results = transcriptevent.transcript.results; for result in results: if result.is_partial is False: for alt in result.alternatives: ... handle alt.transcript here. That gives you one final line per utterance instead of the streaming repeats. Source: https://github.com/awslabs/amazon-transcribe-streaming-sdk/issues/41