Skip to content

Instantly share code, notes, and snippets.

@yegorkryukov
Created June 25, 2020 16:58
Show Gist options
  • Save yegorkryukov/7eb920f4624365733f97d30e5b187d48 to your computer and use it in GitHub Desktop.
Save yegorkryukov/7eb920f4624365733f97d30e5b187d48 to your computer and use it in GitHub Desktop.
# launch the job
job_status = start_transcribe_job(transcribe, JOB_NAME, BUCKET_NAME, FILE_NAME)
# if job launched successfully `job_status` will be True
if job_status: # and we can start requesting the results from the service
text = get_transcription_text(transcribe, JOB_NAME)
print(f'The transcribed text for {FILE_NAME} file:')
print(text)
else: # or print the error code if somethign went wrong
print(f'Job {JOB_NAME} failed with the error: {job_status}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment