Created
July 26, 2024 10:52
-
-
Save warrenkc/ac305c419d31d6dbfc280ff44a7cc0b0 to your computer and use it in GitHub Desktop.
AWS Amazon Transcribe Python - Don't output partial results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async def handle_transcript_event(self, transcript_event: TranscriptEvent): | |
# This handler can be implemented to handle transcriptions as needed. | |
# Here's an example to get started. | |
results = transcript_event.transcript.results | |
for result in results: | |
if not result.is_partial: | |
for alt in result.alternatives: | |
print(alt.transcript) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment