Created
December 12, 2017 09:13
-
-
Save ranman/be87288af3bb8ee8e8490c4ba49dae32 to your computer and use it in GitHub Desktop.
This file contains 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
import time | |
import boto3 | |
transcribe = boto3.client('transcribe') | |
transcribe.start_transcription_job( | |
TranscriptionJobName='RandallTest1', | |
Media={ | |
'MediaFileUri': 'https://s3-us-west-2.amazonaws.com/randhunt-transcribe-demos/test.flac' | |
}, | |
MediaFormat='flac', | |
LanguageCode='en-US', | |
MediaSampleRateHertz=44100 | |
) | |
while transcribe.get_transcription_job(TranscriptionJobName="RandallTest1")['TranscriptionJob']['TranscriptionJobStatus'] != | |
"COMPLETED": | |
print("Not Ready Yet...") | |
time.sleep(5) | |
print(transcribe.get_transcription_job(TranscriptionJobName="RandallTest1")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this updated version
https://gist.github.com/ahmed-abdelazim/a95e36050d45731fd099daae1ec1efd1