Skip to content

Instantly share code, notes, and snippets.

@ahmed-abdelazim
Created October 24, 2019 20:53
Show Gist options
  • Save ahmed-abdelazim/a95e36050d45731fd099daae1ec1efd1 to your computer and use it in GitHub Desktop.
Save ahmed-abdelazim/a95e36050d45731fd099daae1ec1efd1 to your computer and use it in GitHub Desktop.
import time
import boto3
transcribe = boto3.client('transcribe' , region_name='us-west-2',aws_access_key_id='ACCESS_KEY_ID',aws_secret_access_key='SECRET')
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