Use GetTranscriptionJob with an Amazon SDK or CLI - Amazon Transcribe
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use GetTranscriptionJob with an Amazon SDK or CLI

The following code examples show how to use GetTranscriptionJob.

Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code examples:

.NET
Amazon SDK for .NET
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the Amazon Code Examples Repository.

/// <summary> /// Get details about a transcription job. /// </summary> /// <param name="jobName">A unique name for the transcription job.</param> /// <returns>A TranscriptionJob instance with information on the requested job.</returns> public async Task<TranscriptionJob> GetTranscriptionJob(string jobName) { var response = await _amazonTranscribeService.GetTranscriptionJobAsync( new GetTranscriptionJobRequest() { TranscriptionJobName = jobName }); return response.TranscriptionJob; }
CLI
Amazon CLI

To get information about a specific transcription job

The following get-transcription-job example gets information about a specific transcription job. To access the transcription results, use the TranscriptFileUri parameter. Use the MediaFileUri parameter to see which audio file you transcribed with this job. You can use the Settings object to see the optional features you've enabled in the transcription job.

aws transcribe get-transcription-job \ --transcription-job-name your-transcription-job

Output:

{ "TranscriptionJob": { "TranscriptionJobName": "your-transcription-job", "TranscriptionJobStatus": "COMPLETED", "LanguageCode": "language-code", "MediaSampleRateHertz": 48000, "MediaFormat": "mp4", "Media": { "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.file-extension" }, "Transcript": { "TranscriptFileUri": "https://Amazon-S3-file-location-of-transcription-output" }, "StartTime": "2020-09-18T22:27:23.970000+00:00", "CreationTime": "2020-09-18T22:27:23.948000+00:00", "CompletionTime": "2020-09-18T22:28:21.197000+00:00", "Settings": { "ChannelIdentification": false, "ShowAlternatives": false }, "IdentifyLanguage": true, "IdentifiedLanguageScore": 0.8672199249267578 } }

For more information, see Getting Started (Amazon Command Line Interface) in the Amazon Transcribe Developer Guide.

Python
SDK for Python (Boto3)
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the Amazon Code Examples Repository.

def get_job(job_name, transcribe_client): """ Gets details about a transcription job. :param job_name: The name of the job to retrieve. :param transcribe_client: The Boto3 Transcribe client. :return: The retrieved transcription job. """ try: response = transcribe_client.get_transcription_job( TranscriptionJobName=job_name ) job = response["TranscriptionJob"] logger.info("Got job %s.", job["TranscriptionJobName"]) except ClientError: logger.exception("Couldn't get job %s.", job_name) raise else: return job

For a complete list of Amazon SDK developer guides and code examples, see Using this service with an Amazon SDK. This topic also includes information about getting started and details about previous SDK versions.